From 6e56e89845d24cdae3e597ab4bdc3e95003af17e Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 09:16:21 +0100 Subject: [PATCH 01/40] Add .worktrees to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 48b8628..0e48758 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ _site mruby /.bundle/ /vendor/ +.worktrees From 91c586a585e77364475f7113d2b6f056f2f88607 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 13:11:44 +0100 Subject: [PATCH 02/40] New redesign --- _data/release.yml | 2 + _includes/redesign_footer.html | 13 + _includes/redesign_head.html | 21 ++ _includes/redesign_nav.html | 22 ++ _layouts/redesign.html | 25 ++ assets/css/redesign.css | 535 +++++++++++++++++++++++++++++++++ index.html | 53 +++- 7 files changed, 655 insertions(+), 16 deletions(-) create mode 100644 _data/release.yml create mode 100644 _includes/redesign_footer.html create mode 100644 _includes/redesign_head.html create mode 100644 _includes/redesign_nav.html create mode 100644 _layouts/redesign.html create mode 100644 assets/css/redesign.css diff --git a/_data/release.yml b/_data/release.yml new file mode 100644 index 0000000..b4ec6e2 --- /dev/null +++ b/_data/release.yml @@ -0,0 +1,2 @@ +version: "3.4.0" +date: "2025-04-20" diff --git a/_includes/redesign_footer.html b/_includes/redesign_footer.html new file mode 100644 index 0000000..819d51c --- /dev/null +++ b/_includes/redesign_footer.html @@ -0,0 +1,13 @@ + diff --git a/_includes/redesign_head.html b/_includes/redesign_head.html new file mode 100644 index 0000000..1260641 --- /dev/null +++ b/_includes/redesign_head.html @@ -0,0 +1,21 @@ + + +{{ page.title }} + + + + + + + + + + + + + + + + + +{% include icons.html %} diff --git a/_includes/redesign_nav.html b/_includes/redesign_nav.html new file mode 100644 index 0000000..0aa4286 --- /dev/null +++ b/_includes/redesign_nav.html @@ -0,0 +1,22 @@ + diff --git a/_layouts/redesign.html b/_layouts/redesign.html new file mode 100644 index 0000000..cdfee95 --- /dev/null +++ b/_layouts/redesign.html @@ -0,0 +1,25 @@ + + + + {% include redesign_head.html %} + + + {% include redesign_nav.html %} +
+ {{ content }} +
+ {% include redesign_footer.html %} + + + diff --git a/assets/css/redesign.css b/assets/css/redesign.css new file mode 100644 index 0000000..06f425d --- /dev/null +++ b/assets/css/redesign.css @@ -0,0 +1,535 @@ +/* ============================================================ + mruby.org — Redesign CSS + Swiss Clean aesthetic: Space Grotesk + Inter, mruby red + ============================================================ */ + +/* ------------------------------------------------------------ + CSS Custom Properties + ------------------------------------------------------------ */ +:root { + --color-white: #ffffff; + --color-black: #0d0d0d; + --color-red: #ce2812; + --color-red-hover: #b52310; + --color-bg-warm: #f5f3f0; + --color-bg-dark: #111110; + --color-border: #e0dbd5; + --color-border-dark: #222222; + --color-muted: #6b6560; + --color-muted-secondary: #9d9894; + --color-text-body: #3d3a37; + --color-hover-overlay: rgba(0, 0, 0, 0.02); + --color-nav-shadow: rgba(0, 0, 0, 0.08); + --color-footer-muted: #5a5550; + --color-footer-muted-hover: #8a8580; + + --font-heading: 'Space Grotesk', system-ui, sans-serif; + --font-body: 'Inter', system-ui, sans-serif; + + --nav-height: 56px; + --container-padding: 80px; + --container-max-width: 1200px; +} + +/* ------------------------------------------------------------ + Reset + ------------------------------------------------------------ */ +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html { + -webkit-text-size-adjust: 100%; +} + +body { + display: flex; + flex-direction: column; + min-height: 100vh; + font-family: var(--font-body); + font-size: 16px; + line-height: 1.6; + color: var(--color-text-body); + background: var(--color-white); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +main { + flex: 1; +} + +a { + color: inherit; + text-decoration: none; +} + +img { + max-width: 100%; + height: auto; + display: block; +} + +ul { + list-style: none; +} + +/* ------------------------------------------------------------ + Navigation + ------------------------------------------------------------ */ +.site-nav { + position: sticky; + top: 0; + z-index: 100; + height: var(--nav-height); + background: var(--color-white); + border-bottom: 1px solid var(--color-border); + display: flex; + align-items: center; +} + +.site-nav__inner { + width: 100%; + max-width: calc(var(--container-max-width) + 2 * var(--container-padding)); + margin: 0 auto; + padding: 0 var(--container-padding); + display: flex; + align-items: center; + justify-content: space-between; + gap: 32px; +} + +.site-nav__brand { + display: flex; + align-items: center; + gap: 10px; + flex-shrink: 0; +} + +.site-nav__brand img { + width: 28px; + height: 28px; + object-fit: contain; +} + +.site-nav__wordmark { + font-family: var(--font-heading); + font-weight: 700; + font-size: 18px; + letter-spacing: -0.02em; + color: var(--color-black); + line-height: 1; +} + +.site-nav__links { + display: flex; + align-items: center; + gap: 4px; +} + +.site-nav__links a { + font-family: var(--font-body); + font-size: 14px; + font-weight: 400; + color: var(--color-muted); + padding: 6px 12px; + border-radius: 6px; + transition: color 0.15s ease, background 0.15s ease; + white-space: nowrap; +} + +.site-nav__links a:hover { + color: var(--color-black); + background: var(--color-bg-warm); +} + +.site-nav__hamburger { + display: none; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 5px; + width: 40px; + height: 40px; + background: none; + border: none; + cursor: pointer; + padding: 8px; + border-radius: 6px; + flex-shrink: 0; +} + +.site-nav__hamburger:hover { + background: var(--color-bg-warm); +} + +.site-nav__hamburger span { + display: block; + width: 20px; + height: 2px; + background: var(--color-black); + border-radius: 2px; + transition: transform 0.2s ease, opacity 0.2s ease; +} + +.site-nav__hamburger[aria-expanded="true"] span:nth-child(1) { + transform: translateY(7px) rotate(45deg); +} + +.site-nav__hamburger[aria-expanded="true"] span:nth-child(2) { + opacity: 0; +} + +.site-nav__hamburger[aria-expanded="true"] span:nth-child(3) { + transform: translateY(-7px) rotate(-45deg); +} + +/* ------------------------------------------------------------ + Hero Section + ------------------------------------------------------------ */ +.hero { + background: var(--color-bg-warm); + padding: 88px var(--container-padding) 100px; + border-bottom: 1px solid var(--color-border); +} + +.hero__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.hero__content { + max-width: 600px; +} + +.hero__eyebrow { + display: flex; + align-items: center; + gap: 8px; + font-family: var(--font-body); + font-size: 11px; + font-weight: 600; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--color-red); + margin-bottom: 24px; +} + +.hero__eyebrow-dot { + font-size: 10px; + line-height: 1; +} + +.hero__headline { + font-family: var(--font-heading); + font-size: 64px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1.0; + color: var(--color-black); + margin-bottom: 28px; +} + +.hero__description { + font-size: 16px; + line-height: 1.65; + color: var(--color-muted); + margin-bottom: 40px; + max-width: 460px; +} + +.hero__actions { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; +} + +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + font-family: var(--font-heading); + font-size: 15px; + font-weight: 600; + letter-spacing: -0.01em; + line-height: 18px; + border-radius: 0; + padding: 17px 32px; + transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; + cursor: pointer; + border: 1.5px solid transparent; + white-space: nowrap; +} + +.btn--primary { + background: var(--color-red); + color: var(--color-white); + border-color: var(--color-red); +} + +.btn--primary:hover { + background: var(--color-red-hover); + border-color: var(--color-red-hover); + color: var(--color-white); +} + +.btn--outline { + background: transparent; + color: var(--color-black); + border-color: var(--color-black); +} + +.btn--outline:hover { + border-color: var(--color-muted); + background: var(--color-hover-overlay); + color: var(--color-black); +} + +/* ------------------------------------------------------------ + Latest News Section + ------------------------------------------------------------ */ +.latest-news { + padding: 72px var(--container-padding) 88px; + background: var(--color-white); +} + +.latest-news__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.latest-news__header { + display: flex; + align-items: baseline; + justify-content: space-between; + margin-bottom: 20px; +} + +.latest-news__heading { + font-family: var(--font-heading); + font-size: 36px; + font-weight: 700; + letter-spacing: -0.025em; + color: var(--color-black); + line-height: 1; +} + +.latest-news__all-link { + font-size: 14px; + font-weight: 400; + color: var(--color-red); + transition: opacity 0.15s ease; +} + +.latest-news__all-link:hover { + opacity: 0.75; +} + +.latest-news__divider { + height: 1px; + background: var(--color-border); + margin-bottom: 32px; +} + +/* Card grid */ +.news-cards { + display: grid; + grid-template-columns: repeat(3, 1fr); +} + +.news-card { + border: 1px solid var(--color-border); + padding: 28px 28px 32px; + display: flex; + flex-direction: column; + gap: 12px; +} + +.news-card + .news-card { + border-left: none; +} + +.news-card__date { + font-family: var(--font-body); + font-size: 11px; + font-weight: 500; + letter-spacing: 0.06em; + color: var(--color-muted-secondary); + text-transform: uppercase; +} + +.news-card__title { + font-family: var(--font-heading); + font-size: 18px; + font-weight: 600; + letter-spacing: -0.02em; + line-height: 1.3; + color: var(--color-black); + flex: 1; +} + +.news-card__read-more { + font-size: 13px; + font-weight: 400; + color: var(--color-red); + transition: opacity 0.15s ease; + margin-top: 4px; +} + +.news-card__read-more:hover { + opacity: 0.75; +} + +/* ------------------------------------------------------------ + Footer + ------------------------------------------------------------ */ +.site-footer { + background: var(--color-bg-dark); + border-top: 1px solid var(--color-border-dark); + padding: 20px var(--container-padding); +} + +.site-footer__inner { + max-width: calc(var(--container-max-width) + 2 * var(--container-padding)); + margin: 0 auto; + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; +} + +.site-footer__attribution { + font-size: 12px; + color: var(--color-footer-muted); + line-height: 1; +} + +.site-footer__attribution a { + color: var(--color-footer-muted); + transition: color 0.15s ease; +} + +.site-footer__attribution a:hover { + color: var(--color-footer-muted-hover); +} + +.site-footer__feeds { + display: flex; + align-items: center; + gap: 20px; +} + +.site-footer__feeds a { + font-size: 12px; + color: var(--color-footer-muted); + transition: color 0.15s ease; + white-space: nowrap; +} + +.site-footer__feeds a:hover { + color: var(--color-footer-muted-hover); +} + +/* ------------------------------------------------------------ + Responsive — ≤1024px + ------------------------------------------------------------ */ +@media (max-width: 1024px) { + :root { + --container-padding: 40px; + } + + .hero__headline { + font-size: 48px; + } +} + +/* ------------------------------------------------------------ + Responsive — ≤768px + ------------------------------------------------------------ */ +@media (max-width: 768px) { + :root { + --container-padding: 24px; + } + + .site-nav__hamburger { + display: flex; + } + + .site-nav__links { + display: none; + position: absolute; + top: var(--nav-height); + left: 0; + right: 0; + background: var(--color-white); + border-bottom: 1px solid var(--color-border); + flex-direction: column; + align-items: stretch; + padding: 12px 24px; + gap: 4px; + box-shadow: 0 4px 12px var(--color-nav-shadow); + } + + .site-nav__links.is-open { + display: flex; + } + + .site-nav__links a { + padding: 10px 12px; + font-size: 15px; + } + + .hero { + padding: 56px var(--container-padding) 64px; + } + + .hero__headline { + font-size: 36px; + } + + .hero__actions { + flex-direction: column; + align-items: stretch; + } + + .hero__actions .btn { + justify-content: center; + } + + .latest-news__heading { + font-size: 28px; + } + + .news-cards { + grid-template-columns: 1fr; + } + + .news-card + .news-card { + border-left: 1px solid var(--color-border); + border-top: none; + } + + .site-footer__inner { + flex-direction: column; + align-items: flex-start; + gap: 12px; + } +} + +/* ------------------------------------------------------------ + Responsive — ≤480px + ------------------------------------------------------------ */ +@media (max-width: 480px) { + :root { + --container-padding: 16px; + } + + .hero__headline { + font-size: 28px; + } +} diff --git a/index.html b/index.html index 0b16f73..2802250 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,43 @@ --- -layout: default -title: mruby +layout: redesign +title: mruby - Lightweight Ruby --- -
-
- -

- mruby is the lightweight implementation of the Ruby language complying with part of the ISO standard. mruby can be linked and embedded within your application. -

- -
- Download 3.4.0 Source -   or   - Find on GitHub +
+
+
+ OPEN SOURCE · LIGHTWEIGHT · EMBEDDABLE +

Lightweight Ruby for Everywhere

+

+ mruby is the lightweight implementation of the Ruby language, complying with part of the ISO standard. Designed to be embedded within your application. +

+
+
- {% include _latest_news.html %} - -
+
+
+
+

Latest News

+ All releases +
+
+
    + {% for post in site.posts limit:3 %} +
  • + +

    {{ post.title }}

    + — Read more +
  • + {% endfor %} +
+
+
From cbbc9e93de15bf6f664818280010b3b97ff9bdbb Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 14:08:34 +0100 Subject: [PATCH 03/40] Redesign downloads page --- _data/release.yml | 2 - _data/releases.yml | 103 +++++++++ _includes/redesign_nav.html | 10 +- assets/css/redesign.css | 412 ++++++++++++++++++++++++++++++++++++ downloads/index.html | 110 +++++++++- gen_releasedata.rb | 68 ++++++ index.html | 6 +- 7 files changed, 693 insertions(+), 18 deletions(-) delete mode 100644 _data/release.yml create mode 100644 _data/releases.yml create mode 100644 gen_releasedata.rb diff --git a/_data/release.yml b/_data/release.yml deleted file mode 100644 index b4ec6e2..0000000 --- a/_data/release.yml +++ /dev/null @@ -1,2 +0,0 @@ -version: "3.4.0" -date: "2025-04-20" diff --git a/_data/releases.yml b/_data/releases.yml new file mode 100644 index 0000000..8bd0132 --- /dev/null +++ b/_data/releases.yml @@ -0,0 +1,103 @@ +--- +- version: 4.0.0-rc + date: '2026-03-05' + prerelease: true +- version: 3.4.0 + date: '2025-04-20' + prerelease: false +- version: 3.4.0-rc2 + date: '2025-03-17' + prerelease: true +- version: 3.4.0-rc + date: '2025-03-10' + prerelease: true +- version: 3.3.0 + date: '2024-02-14' + prerelease: false +- version: 3.3.0-rc2 + date: '2024-01-04' + prerelease: true +- version: 3.3.0-rc + date: '2023-12-29' + prerelease: true +- version: 3.2.0 + date: '2023-02-24' + prerelease: false +- version: 3.2.0-rc4 + date: '2023-02-08' + prerelease: true +- version: 3.2.0-rc3 + date: '2023-01-23' + prerelease: true +- version: 3.2.0-rc2 + date: '2023-01-18' + prerelease: true +- version: 3.2.0-rc + date: '2023-01-13' + prerelease: true +- version: 3.1.0 + date: '2022-05-12' + prerelease: false +- version: 3.1.0-rc2 + date: '2022-03-31' + prerelease: true +- version: 3.1.0-rc + date: '2022-01-17' + prerelease: true +- version: 3.0.0 + date: '2021-03-05' + prerelease: false +- version: 3.0.0-rc + date: '2021-02-03' + prerelease: true +- version: 3.0.0-preview + date: '2020-10-16' + prerelease: true +- version: 2.1.2 + date: '2020-08-06' + prerelease: false +- version: 2.1.2-rc2 + date: '2020-07-29' + prerelease: true +- version: 2.1.2-rc + date: '2020-07-01' + prerelease: true +- version: 2.1.1 + date: '2020-06-04' + prerelease: false +- version: 2.1.1-rc2 + date: '2020-05-07' + prerelease: true +- version: 2.1.1-rc + date: '2020-04-10' + prerelease: true +- version: 2.1.0 + date: '2019-11-10' + prerelease: false +- version: 2.1.0-rc + date: '2019-10-18' + prerelease: true +- version: 2.0.1 + date: '2019-04-04' + prerelease: false +- version: 2.0.0 + date: '2018-12-10' + prerelease: false +- version: 1.4.1 + date: '2018-04-27' + prerelease: false +- version: 1.4.0 + date: '2018-01-16' + prerelease: false +- version: 1.3.0 + date: '2017-07-04' + prerelease: false +- version: 1.2.0 + date: '2015-11-18' + prerelease: false +- version: 1.1.0 + date: '2014-11-19' + prerelease: false +- version: 1.0.0 + date: '2014-02-09' + prerelease: false diff --git a/_includes/redesign_nav.html b/_includes/redesign_nav.html index 0aa4286..ec787c1 100644 --- a/_includes/redesign_nav.html +++ b/_includes/redesign_nav.html @@ -12,11 +12,11 @@
diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 06f425d..9d6257a 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -147,6 +147,15 @@ ul { background: var(--color-bg-warm); } +.site-nav__links a[aria-current="page"] { + color: var(--color-black); + font-weight: 600; + text-decoration: underline; + text-decoration-color: var(--color-red); + text-decoration-thickness: 2px; + text-underline-offset: 3px; +} + .site-nav__hamburger { display: none; flex-direction: column; @@ -435,6 +444,356 @@ ul { color: var(--color-footer-muted-hover); } +/* ------------------------------------------------------------ + Page Header (inner pages) + ------------------------------------------------------------ */ +.page-header { + padding: 80px var(--container-padding) 64px; +} + +.page-header__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.page-header__eyebrow { + display: flex; + align-items: center; + gap: 8px; + font-family: var(--font-heading); + font-size: 12px; + font-weight: 500; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-red); + margin-bottom: 20px; +} + +.page-header__eyebrow-dot { + width: 8px; + height: 8px; + border-radius: 50%; + background: var(--color-red); + flex-shrink: 0; +} + +.page-header__heading { + font-family: var(--font-heading); + font-size: 56px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1.2; + color: var(--color-black); + margin-bottom: 16px; +} + +.page-header__description { + font-size: 17px; + line-height: 1.65; + color: var(--color-muted); + max-width: 560px; +} + +.page-header__description a { + color: var(--color-red); + transition: opacity 0.15s ease; +} + +.page-header__description a:hover { + opacity: 0.75; +} + +/* ------------------------------------------------------------ + Downloads — Current Release + ------------------------------------------------------------ */ +.downloads-current { + padding: 0 var(--container-padding) 80px; +} + +.downloads-current__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.release-card { + display: flex; + align-items: flex-start; + padding: 48px 56px; + gap: 80px; + background: var(--color-bg-warm); + border-left: 4px solid var(--color-red); +} + +.release-card__info { + display: flex; + flex-direction: column; + gap: 12px; + flex-shrink: 0; +} + +.release-card__label { + font-family: var(--font-body); + font-size: 12px; + font-weight: 500; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-red); + line-height: 16px; +} + +.release-card__version { + font-family: var(--font-heading); + font-size: 48px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1; + color: var(--color-black); +} + +.release-card__date { + font-size: 13px; + color: var(--color-muted); + line-height: 16px; +} + +.release-card__downloads { + display: flex; + flex-direction: column; + gap: 16px; + flex: 1; +} + +.release-card__downloads-label { + font-family: var(--font-heading); + font-size: 14px; + font-weight: 600; + letter-spacing: 0.02em; + text-transform: uppercase; + color: var(--color-black); + line-height: 18px; + margin-bottom: 4px; +} + +.download-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 16px 20px; + background: var(--color-white); + border: 1px solid var(--color-border); +} + +.download-row + .download-row { + border-top: none; +} + +.download-row__info { + display: flex; + align-items: center; + gap: 12px; +} + +.download-row__name { + font-family: var(--font-heading); + font-size: 15px; + font-weight: 600; + color: var(--color-black); + line-height: 18px; +} + +.download-row__filename { + font-size: 12px; + color: var(--color-muted); + line-height: 16px; +} + +.download-btn { + display: inline-flex; + align-items: center; + justify-content: center; + height: 36px; + padding: 0 20px; + background: var(--color-red); + color: var(--color-white); + font-family: var(--font-heading); + font-size: 13px; + font-weight: 600; + line-height: 16px; + transition: background 0.15s ease; + white-space: nowrap; + flex-shrink: 0; +} + +.download-btn:hover { + background: var(--color-red-hover); + color: var(--color-white); +} + +.download-more { + display: flex; + align-items: center; + gap: 8px; + padding: 14px 20px; + background: var(--color-white); + border: 1px dashed var(--color-border); + font-size: 13px; + line-height: 16px; +} + +.download-more__text { + color: var(--color-muted); +} + +.download-more__link { + font-weight: 500; + color: var(--color-red); + transition: opacity 0.15s ease; +} + +.download-more__link:hover { + opacity: 0.75; +} + +/* ------------------------------------------------------------ + Downloads — Upcoming Release + ------------------------------------------------------------ */ +.upcoming-releases { + padding: 0 var(--container-padding) 64px; +} + +.upcoming-releases__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.upcoming-releases__header { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 32px; + padding-bottom: 20px; + border-bottom: 1px solid var(--color-border); +} + +.upcoming-releases__heading { + font-family: var(--font-heading); + font-size: 28px; + font-weight: 700; + letter-spacing: -0.02em; + line-height: 34px; + color: var(--color-black); +} + +.upcoming-releases__tag { + font-size: 11px; + font-weight: 500; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--color-muted-secondary); + border: 1px solid var(--color-border); + padding: 2px 8px; + line-height: 18px; +} + +/* ------------------------------------------------------------ + Downloads — Previous Releases + ------------------------------------------------------------ */ +.prev-releases { + padding: 0 var(--container-padding) 96px; +} + +.prev-releases__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.prev-releases__header { + margin-bottom: 32px; + padding-bottom: 20px; + border-bottom: 1px solid var(--color-border); +} + +.prev-releases__heading { + font-family: var(--font-heading); + font-size: 28px; + font-weight: 700; + letter-spacing: -0.02em; + line-height: 34px; + color: var(--color-black); +} + +.releases-table__head { + display: flex; + align-items: center; + padding: 12px 0; + border-bottom: 1px solid var(--color-border); +} + +.releases-table__col-version { + width: 140px; + flex-shrink: 0; + font-size: 11px; + font-weight: 500; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-muted); + line-height: 14px; +} + +.releases-table__col-date { + flex: 1; + font-size: 11px; + font-weight: 500; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-muted); + line-height: 14px; +} + +.release-row { + display: flex; + align-items: center; + padding: 18px 0; + border-bottom: 1px solid var(--color-bg-warm); +} + +.release-row:last-child { + border-bottom: none; +} + +.release-row__version { + width: 140px; + flex-shrink: 0; + font-family: var(--font-heading); + font-size: 15px; + font-weight: 600; + color: var(--color-black); + line-height: 18px; +} + +.release-row__version--muted { + color: var(--color-muted); +} + +.release-row__date { + flex: 1; + font-size: 14px; + color: var(--color-muted); + line-height: 18px; +} + +.release-row__link { + font-size: 14px; + font-weight: 500; + color: var(--color-red); + transition: opacity 0.15s ease; +} + +.release-row__link:hover { + opacity: 0.75; +} + + /* ------------------------------------------------------------ Responsive — ≤1024px ------------------------------------------------------------ */ @@ -446,6 +805,19 @@ ul { .hero__headline { font-size: 48px; } + + .page-header__heading { + font-size: 40px; + } + + .release-card { + gap: 48px; + padding: 40px 40px; + } + + .release-card__version { + font-size: 40px; + } } /* ------------------------------------------------------------ @@ -519,6 +891,34 @@ ul { align-items: flex-start; gap: 12px; } + + .page-header__heading { + font-size: 32px; + } + + .release-card { + flex-direction: column; + gap: 32px; + padding: 32px 28px; + } + + .release-card__version { + font-size: 36px; + } + + .release-card__downloads-label { + margin-bottom: 0; + } + + .download-row { + flex-wrap: wrap; + gap: 12px; + } + + .releases-table__col-version, + .release-row__version { + width: 100px; + } } /* ------------------------------------------------------------ @@ -532,4 +932,16 @@ ul { .hero__headline { font-size: 28px; } + + .page-header__heading { + font-size: 28px; + } + + .release-card { + padding: 24px 20px; + } + + .release-card__version { + font-size: 32px; + } } diff --git a/downloads/index.html b/downloads/index.html index 4981bf3..6d9c9f6 100644 --- a/downloads/index.html +++ b/downloads/index.html @@ -1,13 +1,105 @@ --- -layout: default -title: mruby - downloads +layout: redesign +title: mruby - Downloads --- -
-
-

Downloads

-

- Current stable: mruby 3.4.0 -

+{% assign current = site.data.releases | where: "prerelease", false | first %} +{% assign all_stable = site.data.releases | where: "prerelease", false %} + +{% comment %} Collect any prereleases that are newer than the current stable {% endcomment %} +{% assign upcoming = "" | split: "" %} +{% assign collecting = true %} +{% for release in site.data.releases %} + {% if collecting %} + {% if release.version == current.version %} + {% assign collecting = false %} + {% elsif release.prerelease %} + {% assign upcoming = upcoming | push: release %} + {% endif %} + {% endif %} +{% endfor %} + + + +
+
+
+
+ Current Stable + {{ current.version }} + Released {{ current.date | date: "%-d %b %Y" }} +
+
+
Download
+
+
+ Source .zip + mruby-{{ current.version }}.zip · via GitHub +
+ Download +
+
+
+ Source .tar.gz + mruby-{{ current.version }}.tar.gz · via GitHub +
+ Download +
+
+ More assets and checksums available on + GitHub Releases → +
+
+
+
+
+ +{% if upcoming.size > 0 %} +
+
+
+

Upcoming Release

+ Pre-release +
+
+ Version + Date +
+ {% for release in upcoming %} +
+ {{ release.version }} + {{ release.date | date: "%-d %b %Y" }} + Changelog → +
+ {% endfor %} +
+
+{% endif %} + +
+
+
+

Previous Releases

+
+
+ Version + Date +
+ {% for release in all_stable %}{% unless forloop.first %} +
+ {{ release.version }} + {{ release.date | date: "%-d %b %Y" }} + Changelog → +
+ {% endunless %}{% endfor %}
-
+ diff --git a/gen_releasedata.rb b/gen_releasedata.rb new file mode 100644 index 0000000..0fa50f3 --- /dev/null +++ b/gen_releasedata.rb @@ -0,0 +1,68 @@ +# Regenerate _data/releases.yml from GitHub API. +# +# All pages derive the current stable release from the first non-prerelease +# entry in this file. Run this script after each new release or RC tag. +# +# Stable release dates are sourced from blog post filenames where available, +# falling back to the GitHub commit date for releases without a post. +# +# Usage: +# bundle exec ruby gen_releasedata.rb +# +# Requires a GitHub token via GH_TOKEN env var or `gh auth token`. + +require 'net/http' +require 'json' +require 'yaml' + +REPO = 'mruby/mruby' +DATA_FILE = File.join(__dir__, '_data', 'releases.yml') + +def gh_get(path) + uri = URI("https://api.github.com#{path}") + token = ENV['GH_TOKEN'] || `gh auth token 2>/dev/null`.strip + headers = { + 'Accept' => 'application/vnd.github.v3+json', + 'User-Agent' => 'mruby-site', + 'Authorization' => "Bearer #{token}" + } + Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| + JSON.parse(http.get(uri.request_uri, headers).body) + end +end + +# Derive release dates from blog post filenames (format: YYYY-MM-DD-mruby-X.Y.Z-released.*) +post_dates = {} +Dir.glob(File.join(__dir__, '_posts', '*.{markdown,md}')).each do |f| + if (m = File.basename(f).match(/^(\d{4}-\d{2}-\d{2})-mruby-([\d.]+)-released/)) + post_dates[m[2]] = m[1] + end +end + +# Fetch all tags (paginated) +tags = [] +page = 1 +loop do + batch = gh_get("/repos/#{REPO}/tags?per_page=100&page=#{page}") + break if batch.empty? + tags.concat(batch) + break if batch.size < 100 + page += 1 +end + +# Keep all version-like tags (stable + rc/preview) +versioned = tags.select { |t| t['name'].match?(/^\d/) } + +releases = versioned.map do |tag| + version = tag['name'] + prerelease = !version.match?(/^\d+\.\d+\.\d+$/) + date = post_dates[version] || begin + commit = gh_get("/repos/#{REPO}/commits/#{tag['commit']['sha']}") + commit.dig('commit', 'committer', 'date')&.slice(0, 10) + end + $stdout.puts " #{version}: #{date}#{' (prerelease)' if prerelease}" + { 'version' => version, 'date' => date, 'prerelease' => prerelease } +end + +File.write(DATA_FILE, releases.to_yaml) +$stdout.puts "\nWritten #{releases.size} releases to #{DATA_FILE}" diff --git a/index.html b/index.html index 2802250..f60a53b 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,8 @@ title: mruby - Lightweight Ruby --- +{% assign current_release = site.data.releases | where: "prerelease", false | first %} +
@@ -12,8 +14,8 @@

Lightweight Ruby for Everywhere

mruby is the lightweight implementation of the Ruby language, complying with part of the ISO standard. Designed to be embedded within your application.

- - Download {{ site.data.release.version }} + + Download {{ current_release.version }} View on GitHub From 059cd7f7863fe8a9cb457ada8711274e46b8878d Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 14:43:00 +0100 Subject: [PATCH 04/40] Redesign Documentation --- assets/css/redesign.css | 293 ++++++++++++++++++ .../executing-ruby-code-with-mruby.md | 1 + docs/index.html | 87 ++++++ docs/index.md | 28 -- 4 files changed, 381 insertions(+), 28 deletions(-) create mode 100644 docs/index.html delete mode 100644 docs/index.md diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 9d6257a..13b43bf 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -794,6 +794,272 @@ ul { } +/* ------------------------------------------------------------ + Page Header — Warm variant (Documentation) + ------------------------------------------------------------ */ +.page-header--warm { + background: var(--color-bg-warm); + border-bottom: 1px solid var(--color-border); +} + +.page-header__inner--split { + display: flex; + align-items: flex-end; + justify-content: space-between; + gap: 40px; +} + +.page-header__meta { + display: flex; + align-items: center; + gap: 8px; + flex-shrink: 0; + padding-bottom: 4px; +} + +.page-header__meta-label { + font-size: 14px; + color: var(--color-muted); + line-height: 18px; +} + +.page-header__meta-version { + font-family: var(--font-heading); + font-size: 14px; + font-weight: 600; + color: var(--color-black); + line-height: 18px; +} + +/* ------------------------------------------------------------ + Documentation — Content Grid + ------------------------------------------------------------ */ +.docs-grid { + padding: 80px var(--container-padding); +} + +.docs-grid__inner { + max-width: var(--container-max-width); + margin: 0 auto; + display: grid; + grid-template-columns: 1fr 1fr; + gap: 80px; +} + +/* Articles column */ +.docs-articles { + display: flex; + flex-direction: column; + gap: 48px; +} + +/* Source note */ +.docs-source-note { + padding: 28px 32px; + background: var(--color-bg-warm); + border-left: 3px solid var(--color-border); + display: flex; + flex-direction: column; + gap: 14px; +} + +.docs-source-note__text { + font-size: 15px; + line-height: 1.65; + color: var(--color-muted); +} + +.docs-badge { + display: inline-block; + padding: 1px 6px; + background: var(--color-white); + font-family: var(--font-heading); + font-size: 14px; + font-weight: 600; + color: var(--color-black); + line-height: 26px; +} + +.docs-source-note__link { + display: flex; + align-items: center; + gap: 6px; + font-size: 13px; + font-weight: 500; + color: var(--color-red); + line-height: 16px; + transition: opacity 0.15s ease; +} + +.docs-source-note__link:hover { + opacity: 0.75; +} + +.docs-source-note__dash { + width: 16px; + height: 1px; + background: var(--color-red); + flex-shrink: 0; +} + +/* Section heading pattern */ +.docs-section { + display: flex; + flex-direction: column; + gap: 24px; +} + +.docs-section__header { + display: flex; + align-items: center; + gap: 12px; + padding-bottom: 20px; + border-bottom: 1px solid var(--color-border); +} + +.docs-section__bar { + width: 20px; + height: 2px; + background: var(--color-red); + flex-shrink: 0; +} + +.docs-section__heading { + font-family: var(--font-heading); + font-size: 22px; + font-weight: 700; + letter-spacing: -0.01em; + color: var(--color-black); + line-height: 28px; +} + +/* Article row */ +.docs-article-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 24px; + border: 1px solid var(--color-border); + gap: 32px; + transition: background 0.15s ease; +} + +.docs-article-row:hover { + background: var(--color-bg-warm); +} + +.docs-article-row__info { + display: flex; + flex-direction: column; + gap: 6px; +} + +.docs-article-row__title { + font-family: var(--font-heading); + font-size: 16px; + font-weight: 600; + letter-spacing: -0.01em; + color: var(--color-black); + line-height: 20px; +} + +.docs-article-row__desc { + font-size: 13px; + color: var(--color-muted); + line-height: 16px; +} + +.docs-article-row__link { + font-size: 13px; + font-weight: 500; + color: var(--color-red); + line-height: 16px; + flex-shrink: 0; + white-space: nowrap; +} + +/* Components column */ +.docs-components { + display: flex; + flex-direction: column; + gap: 24px; +} + +/* Component card */ +.docs-component-card { + display: flex; + align-items: flex-start; + justify-content: space-between; + padding: 28px 32px; + gap: 24px; + transition: opacity 0.15s ease; +} + +.docs-component-card:hover { + opacity: 0.88; +} + +.docs-component-card--warm { + background: var(--color-bg-warm); +} + +.docs-component-card--bordered { + border: 1px solid var(--color-border); +} + +.docs-component-card__info { + display: flex; + flex-direction: column; + gap: 8px; +} + +.docs-component-card__title { + font-family: var(--font-heading); + font-size: 18px; + font-weight: 700; + letter-spacing: -0.01em; + color: var(--color-black); + line-height: 22px; +} + +.docs-component-card__desc { + font-size: 14px; + color: var(--color-muted); + line-height: 22px; +} + +.docs-component-card__tags { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-top: 8px; +} + +.docs-component-tag { + display: inline-block; + padding: 3px 8px; + background: var(--color-white); + font-family: var(--font-heading); + font-size: 13px; + font-weight: 600; + color: var(--color-red); + line-height: 16px; +} + +.docs-component-tag--muted { + color: var(--color-muted); +} + +.docs-component-card__link { + font-size: 13px; + font-weight: 500; + color: var(--color-red); + line-height: 16px; + flex-shrink: 0; + margin-top: 4px; + white-space: nowrap; +} + /* ------------------------------------------------------------ Responsive — ≤1024px ------------------------------------------------------------ */ @@ -818,6 +1084,14 @@ ul { .release-card__version { font-size: 40px; } + + .docs-grid { + padding: 64px var(--container-padding); + } + + .docs-grid__inner { + gap: 48px; + } } /* ------------------------------------------------------------ @@ -919,6 +1193,25 @@ ul { .release-row__version { width: 100px; } + + .page-header__inner--split { + flex-direction: column; + align-items: flex-start; + gap: 24px; + } + + .page-header__meta { + padding-bottom: 0; + } + + .docs-grid__inner { + grid-template-columns: 1fr; + gap: 48px; + } + + .docs-grid { + padding: 48px var(--container-padding); + } } /* ------------------------------------------------------------ diff --git a/docs/articles/executing-ruby-code-with-mruby.md b/docs/articles/executing-ruby-code-with-mruby.md index f537da9..acab9be 100644 --- a/docs/articles/executing-ruby-code-with-mruby.md +++ b/docs/articles/executing-ruby-code-with-mruby.md @@ -1,6 +1,7 @@ --- layout: post title: Executing Ruby code with mruby +description: "REPL, .rb files, C embedding, bytecode \u2014 four execution methods compared" categories: articles --- diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..5508b9f --- /dev/null +++ b/docs/index.html @@ -0,0 +1,87 @@ +--- +layout: redesign +title: mruby - Documentation +--- + +{% assign current = site.data.releases | where: "prerelease", false | first %} + + + +
+ +
diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index c4cf8d3..0000000 --- a/docs/index.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: default -title: mruby - docs ---- - -# Documentation - -At the moment the source code ([`mruby/doc/`][mruby-doc]) includes further -documentation about compiling, configuring (`mrbconf`), debugging (`mrdb`), -and extending (`mrbgems`) mruby. - -[mruby-doc]: https://github.com/mruby/mruby/tree/master/doc - -## Articles - -
-{% for page in site.pages %} - {% if page.categories contains 'articles' %} - {% capture article %} - [{{ page.title }}]({{ page.url }}) {% endcapture %} - {{ article | markdownify }} - {% endif %} -{% endfor %} -
- -## Components - -- [API docs](api) -- [mruby, mruby/c Common I/O API Guidelines and Community-developed Libraries](https://github.com/mruby/microcontroller-peripheral-interface-guide) From db665af955dc8ba6beaceee9cf62d929aad0fe46 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 15:12:19 +0100 Subject: [PATCH 05/40] Add .libs-* CSS classes for Libraries page redesign --- assets/css/redesign.css | 274 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 13b43bf..23f2995 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -1238,3 +1238,277 @@ ul { font-size: 32px; } } + +/* ------------------------------------------------------------ + Libraries — Page Header + ------------------------------------------------------------ */ +.libs-header { + background: var(--color-bg-warm); + border-bottom: 1px solid var(--color-border); + padding: 80px var(--container-padding) 56px; +} + +.libs-header__inner { + max-width: var(--container-max-width); + margin: 0 auto; + display: flex; + align-items: flex-end; + justify-content: space-between; + gap: 40px; +} + +.libs-header__count { + display: flex; + align-items: center; + gap: 12px; + flex-shrink: 0; + padding-bottom: 4px; +} + +.libs-header__count-number { + font-family: var(--font-heading); + font-size: 36px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1; + color: var(--color-black); +} + +.libs-header__count-label { + font-size: 14px; + line-height: 1.4; + color: var(--color-muted); +} + +/* ------------------------------------------------------------ + Libraries — Toolbar + ------------------------------------------------------------ */ +.libs-toolbar { + background: var(--color-white); + border-bottom: 1px solid var(--color-border); + padding: 24px var(--container-padding); +} + +.libs-toolbar__inner { + max-width: var(--container-max-width); + margin: 0 auto; + display: flex; + align-items: center; + justify-content: space-between; + gap: 24px; +} + +.libs-search { + display: flex; + align-items: center; + width: 400px; + height: 40px; + padding: 0 16px; + gap: 12px; + background: #FAF9F8; + border: 1.5px solid var(--color-border); + flex-shrink: 0; +} + +.libs-search__icon { + flex-shrink: 0; + color: var(--color-muted-secondary); +} + +.libs-search__input { + flex: 1; + border: none; + background: transparent; + font-family: var(--font-body); + font-size: 14px; + color: var(--color-text-body); + outline: none; + line-height: 18px; +} + +.libs-search__input::placeholder { + color: var(--color-muted-secondary); +} + +.libs-toolbar__count { + font-size: 13px; + color: var(--color-muted); + white-space: nowrap; + line-height: 16px; +} + +/* ------------------------------------------------------------ + Libraries — Gem Grid + ------------------------------------------------------------ */ +.libs-grid { + padding: 0 var(--container-padding) 0; + background: var(--color-bg-warm); +} + +.libs-grid__inner { + max-width: var(--container-max-width); + margin: 0 auto; + padding: 32px 0; +} + +.libs-grid__rows { + display: flex; + flex-direction: column; + gap: 1px; + background: var(--color-border); +} + +.libs-row { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1px; + background: var(--color-border); +} + +.libs-card { + padding: 28px 32px; + background: var(--color-white); + display: flex; + flex-direction: column; + gap: 10px; +} + +.libs-card[hidden] { + display: none; +} + +.libs-card__header { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 12px; +} + +.libs-card__name { + font-family: var(--font-heading); + font-size: 15px; + font-weight: 600; + letter-spacing: -0.01em; + color: var(--color-red); + line-height: 18px; + transition: opacity 0.15s ease; +} + +.libs-card__name:hover { + opacity: 0.75; +} + +.libs-card__author { + font-family: var(--font-body); + font-size: 11px; + font-weight: 400; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--color-muted-secondary); + line-height: 14px; + flex-shrink: 0; + margin-top: 2px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 120px; +} + +.libs-card__description { + font-size: 14px; + line-height: 22px; + color: var(--color-muted); +} + +/* ------------------------------------------------------------ + Libraries — Footer Row + ------------------------------------------------------------ */ +.libs-footer { + border-top: 1px solid var(--color-border); + background: var(--color-white); + padding: 48px var(--container-padding); + text-align: center; +} + +.libs-footer__inner { + max-width: var(--container-max-width); + margin: 0 auto; + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + flex-wrap: wrap; +} + +.libs-footer__text { + font-size: 14px; + color: var(--color-muted); + line-height: 18px; +} + +.libs-footer__link { + font-size: 14px; + font-weight: 500; + color: var(--color-red); + line-height: 18px; + transition: opacity 0.15s ease; +} + +.libs-footer__link:hover { + opacity: 0.75; +} + +/* No results state */ +.libs-no-results { + display: none; + padding: 64px 32px; + text-align: center; + background: var(--color-white); +} + +.libs-no-results.is-visible { + display: block; +} + +.libs-no-results__text { + font-size: 15px; + color: var(--color-muted); +} + +/* ------------------------------------------------------------ + Libraries — Responsive ≤768px + ------------------------------------------------------------ */ +@media (max-width: 768px) { + .libs-header__inner { + flex-direction: column; + align-items: flex-start; + gap: 24px; + } + + .libs-header__count { + padding-bottom: 0; + } + + .libs-search { + width: 100%; + } + + .libs-toolbar__inner { + flex-direction: column; + align-items: stretch; + gap: 12px; + } + + .libs-row { + grid-template-columns: repeat(2, 1fr); + } +} + +/* ------------------------------------------------------------ + Libraries — Responsive ≤480px + ------------------------------------------------------------ */ +@media (max-width: 480px) { + .libs-row { + grid-template-columns: 1fr; + } +} From ed5905b51758b3fcf5c06d469266bd61e6392078 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 15:15:32 +0100 Subject: [PATCH 06/40] Fix CSS quality issues in .libs-* block --- assets/css/redesign.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 23f2995..1200720 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -1305,7 +1305,7 @@ ul { height: 40px; padding: 0 16px; gap: 12px; - background: #FAF9F8; + background: var(--color-bg-warm); border: 1.5px solid var(--color-border); flex-shrink: 0; } @@ -1330,6 +1330,10 @@ ul { color: var(--color-muted-secondary); } +.libs-search:focus-within { + border-color: var(--color-black); +} + .libs-toolbar__count { font-size: 13px; color: var(--color-muted); @@ -1341,7 +1345,7 @@ ul { Libraries — Gem Grid ------------------------------------------------------------ */ .libs-grid { - padding: 0 var(--container-padding) 0; + padding: 0 var(--container-padding); background: var(--color-bg-warm); } @@ -1373,6 +1377,10 @@ ul { gap: 10px; } +.libs-card:hover { + background: var(--color-bg-warm); +} + .libs-card[hidden] { display: none; } @@ -1458,7 +1466,9 @@ ul { opacity: 0.75; } -/* No results state */ +/* ------------------------------------------------------------ + Libraries — No Results + ------------------------------------------------------------ */ .libs-no-results { display: none; padding: 64px 32px; From fd0ec83e53a8d0a04fc63f109f5bafd3d4960171 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 15:18:26 +0100 Subject: [PATCH 07/40] Redesign Libraries page with mrbgems grid and JS search --- libraries/index.html | 165 +++++++++++++++++++++++++++++++++---------- 1 file changed, 129 insertions(+), 36 deletions(-) diff --git a/libraries/index.html b/libraries/index.html index eccb18e..a0f0b18 100644 --- a/libraries/index.html +++ b/libraries/index.html @@ -1,43 +1,136 @@ --- -layout: default -title: mruby - libraries +layout: redesign +title: mruby - Libraries --- -
-
- +{% assign total = site.data.mgems | size %} + +
+
+
+
+ + Libraries +
+

mrbgems

+

+ mrbgems is mruby's package manager. See the + mrbgems doc + for how to use it. +

+
+
+ {{ total }} + community
libraries
+
-
-
-
-

- mrbgems is mruby's package manager. See the mrbgems doc for more information about how to use it. -

+
+ +
+
+ + Showing {{ total }} libraries
-
-
-
- - - - - - - - {% for mgem_data in site.data.mgems %} - - - - - - {% endfor %} - -
NameDescriptionAuthor
- {{ mgem_data.name }} - - {{ mgem_data.description }} - - {{ mgem_data.author }} -
+ + +
+
+
+ {% assign gems = site.data.mgems %} + {% assign row_size = 3 %} + {% assign row_index = 0 %} + {% for mgem in gems %} + {% assign mod = row_index | modulo: row_size %} + {% if mod == 0 %}
{% endif %} + +
+ {{ mgem.name }} + {{ mgem.author }} +
+

{{ mgem.description }}

+
+ {% assign row_index = row_index | plus: 1 %} + {% assign mod_end = row_index | modulo: row_size %} + {% if mod_end == 0 or forloop.last %}
{% endif %} + {% endfor %} +
+
+

No libraries match your search.

+
+
+
+ + + + From 5e85fd140942b3bffb9a99d155ad021fea8c6759 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 15:32:18 +0100 Subject: [PATCH 08/40] Fix author arrays, HTML escaping, null guard, and code quality in Libraries page --- libraries/index.html | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/libraries/index.html b/libraries/index.html index a0f0b18..bbf0e80 100644 --- a/libraries/index.html +++ b/libraries/index.html @@ -55,16 +55,17 @@

mrbgems

{% for mgem in gems %} {% assign mod = row_index | modulo: row_size %} {% if mod == 0 %}
{% endif %} + {% if mgem.author.first %}{% assign mgem_author = mgem.author | join: ", " %}{% else %}{% assign mgem_author = mgem.author %}{% endif %}
{{ mgem.name }} - {{ mgem.author }} + {{ mgem_author }}

{{ mgem.description }}

@@ -79,12 +80,12 @@

mrbgems

- + - \ No newline at end of file + diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 6598636..3153d6b 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -2076,3 +2076,312 @@ ul { width: 100%; } } + +/* ------------------------------------------------------------ + Article — Header + ------------------------------------------------------------ */ +.article-header { + background: var(--color-bg-warm); + border-bottom: 1px solid var(--color-border); + padding: 64px var(--container-padding) 56px; +} + +.article-header__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +.article-header__meta { + display: flex; + align-items: center; + gap: 10px; + font-size: 13px; + line-height: 1; + margin-bottom: 24px; +} + +.article-header__category { + font-weight: 500; + color: var(--color-muted); +} + +.article-header__meta-sep { + color: var(--color-muted-secondary); +} + +.article-header__date { + color: var(--color-muted); +} + +.article-header__title { + font-family: var(--font-heading); + font-size: 56px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1.1; + color: var(--color-black); + max-width: 800px; +} + +/* ------------------------------------------------------------ + Article — Body Layout + ------------------------------------------------------------ */ +.article-body { + padding: 80px var(--container-padding); +} + +.article-body__inner { + max-width: var(--container-max-width); + margin: 0 auto; + display: flex; + gap: 64px; + align-items: flex-start; +} + +/* ------------------------------------------------------------ + Article — Table of Contents + ------------------------------------------------------------ */ +.article-toc { + width: 220px; + flex-shrink: 0; + position: sticky; + top: calc(var(--nav-height) + 32px); +} + +.article-toc__label { + font-family: var(--font-heading); + font-size: 11px; + font-weight: 600; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--color-muted-secondary); + margin-bottom: 16px; + line-height: 14px; +} + +.article-toc__list { + display: flex; + flex-direction: column; + gap: 2px; +} + +.article-toc__item { + border-left: 2px solid var(--color-border); +} + +.article-toc__item--active { + border-left-color: var(--color-red); +} + +.article-toc__item--active .article-toc__link { + color: var(--color-red); +} + +.article-toc__link { + display: block; + font-size: 13px; + color: var(--color-muted); + padding: 6px 0 6px 12px; + line-height: 1.4; + transition: color 0.15s ease; +} + +.article-toc__link:hover { + color: var(--color-black); +} + +.article-toc__item--sub .article-toc__link { + font-size: 12px; + padding-left: 24px; +} + +/* ------------------------------------------------------------ + Article — Content (rendered Markdown) + ------------------------------------------------------------ */ +.article-content { + flex: 1; + min-width: 0; +} + +.article-content h1, +.article-content h2, +.article-content h3 { + scroll-margin-top: calc(var(--nav-height) + 32px); +} + +.article-content h1 { + display: flex; + align-items: center; + gap: 14px; + font-family: var(--font-heading); + font-size: 28px; + font-weight: 700; + letter-spacing: -0.02em; + line-height: 1.2; + color: var(--color-black); + padding-bottom: 20px; + border-bottom: 1px solid var(--color-border); + margin-top: 56px; + margin-bottom: 20px; +} + +.article-content h1:first-child { + margin-top: 0; +} + +.article-content h1::before { + content: ''; + display: block; + width: 20px; + height: 2px; + background: var(--color-red); + flex-shrink: 0; +} + +.article-content h2 { + font-family: var(--font-heading); + font-size: 20px; + font-weight: 700; + letter-spacing: -0.01em; + color: var(--color-black); + margin-top: 32px; + margin-bottom: 12px; +} + +.article-content h3 { + font-family: var(--font-heading); + font-size: 17px; + font-weight: 600; + color: var(--color-black); + margin-top: 24px; + margin-bottom: 10px; +} + +.article-content p { + font-size: 16px; + line-height: 1.65; + color: var(--color-muted); + margin-bottom: 16px; +} + +.article-content a { + color: var(--color-red); + transition: opacity 0.15s ease; +} + +.article-content a:hover { + opacity: 0.75; +} + +.article-content ul, +.article-content ol { + list-style: none; + margin-bottom: 24px; +} + +.article-content li { + font-size: 15px; + line-height: 1.55; + color: var(--color-text-body); + padding: 12px 0; + border-bottom: 1px solid var(--color-bg-warm); +} + +.article-content li:first-child { + border-top: 1px solid var(--color-bg-warm); +} + +.article-content li a { + color: var(--color-red); +} + +.article-content code { + background: var(--color-border); + padding: 1px 6px; + border-radius: 3px; + font-size: 0.875em; + font-weight: 600; + color: var(--color-text-body); + font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; +} + +.article-content pre { + background: var(--color-bg-warm); + border: 1px solid var(--color-border); + padding: 20px 24px; + overflow-x: auto; + margin-bottom: 24px; +} + +.article-content pre code { + background: none; + padding: 0; + font-size: 14px; +} + +.article-content strong { + font-weight: 600; + color: var(--color-black); +} + +.article-content em { + font-style: italic; +} + +.article-content hr { + border: none; + border-top: 1px solid var(--color-border); + margin: 40px 0; +} + +/* ------------------------------------------------------------ + Article — Responsive ≤1024px + ------------------------------------------------------------ */ +@media (max-width: 1024px) { + .article-toc { + display: none; + } + + .article-body__inner { + gap: 0; + } + + .article-header__title { + font-size: 44px; + } +} + +/* ------------------------------------------------------------ + Article — Responsive ≤768px + ------------------------------------------------------------ */ +@media (max-width: 768px) { + .article-header { + padding: 48px var(--container-padding) 40px; + } + + .article-header__title { + font-size: 36px; + } + + .article-body { + padding: 48px var(--container-padding); + } + + .article-content h1 { + font-size: 22px; + margin-top: 40px; + } +} + +/* ------------------------------------------------------------ + Article — Responsive ≤480px + ------------------------------------------------------------ */ +@media (max-width: 480px) { + .article-header__title { + font-size: 28px; + } + + .article-content h1 { + font-size: 20px; + } +} From 3ef8c46b511cacf90fb7d61131023c8530d7ff63 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 17:56:35 +0100 Subject: [PATCH 15/40] Fix team CSS: remove no-op display:block, add 480px heading size --- assets/css/redesign.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/css/redesign.css b/assets/css/redesign.css index 3153d6b..d012dee 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -1908,7 +1908,6 @@ ul { } .team-section__bar { - display: block; width: 20px; height: 2px; background: var(--color-red); @@ -2072,6 +2071,10 @@ ul { Team — Responsive ≤480px ------------------------------------------------------------ */ @media (max-width: 480px) { + .team-header__heading { + font-size: 28px; + } + .team-member { width: 100%; } From 9ca34f83afceaf5676214e8f85f3ae1df3fc13bb Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 17:58:35 +0100 Subject: [PATCH 16/40] Fix nav link to /team/, fill member grid using CSS auto-fill --- _includes/redesign_nav.html | 2 +- assets/css/redesign.css | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/_includes/redesign_nav.html b/_includes/redesign_nav.html index 55ea8ff..6d6321a 100644 --- a/_includes/redesign_nav.html +++ b/_includes/redesign_nav.html @@ -16,7 +16,7 @@
  • Documentation
  • Libraries
  • About
  • -
  • Team
  • +
  • Team
  • diff --git a/assets/css/redesign.css b/assets/css/redesign.css index d012dee..b370b59 100644 --- a/assets/css/redesign.css +++ b/assets/css/redesign.css @@ -1931,8 +1931,8 @@ ul { } .team-members__grid { - display: flex; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--color-border); margin-bottom: 80px; @@ -1942,11 +1942,9 @@ ul { display: flex; flex-direction: column; align-items: center; - width: 256px; padding: 32px 24px; gap: 12px; background: var(--color-white); - flex-shrink: 0; transition: background 0.15s ease; } @@ -2048,10 +2046,6 @@ ul { .team-header__heading { font-size: 40px; } - - .team-member { - width: calc(25% - 1px); - } } /* ------------------------------------------------------------ @@ -2061,10 +2055,6 @@ ul { .team-header__heading { font-size: 32px; } - - .team-member { - width: calc(50% - 1px); - } } /* ------------------------------------------------------------ @@ -2074,10 +2064,6 @@ ul { .team-header__heading { font-size: 28px; } - - .team-member { - width: 100%; - } } /* ------------------------------------------------------------ From 1b77b08e6045b2bdc34ae07e0a1d994c402c5bcc Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 18:51:38 +0100 Subject: [PATCH 17/40] Refactor reusable components --- _layouts/post.html | 14 +- _sass/_page-header.scss | 223 ++++++++++++ about/index.html | 8 +- assets/css/{redesign.css => redesign.scss} | 384 +-------------------- docs/index.html | 8 +- downloads/index.html | 2 +- index.html | 14 +- libraries/index.html | 14 +- team/index.html | 14 +- 9 files changed, 271 insertions(+), 410 deletions(-) create mode 100644 _sass/_page-header.scss rename assets/css/{redesign.css => redesign.scss} (84%) diff --git a/_layouts/post.html b/_layouts/post.html index e4c89c7..5454fd4 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -6,8 +6,8 @@ {% include redesign_nav.html %}
    -
    -
    +
    +
    {% assign first_cat = page.categories | first %} {% if first_cat.size > 1 %} {% assign display_cat = first_cat | capitalize %} @@ -15,13 +15,13 @@ {% assign display_cat = page.categories | capitalize %} {% endif %} {% if display_cat or page.date %} -
    - {% if display_cat %}{{ display_cat }}{% endif %} - {% if display_cat and page.date %}{% endif %} - {% if page.date %}{% endif %} +
    + {% if display_cat %}{{ display_cat }}{% endif %} + {% if display_cat and page.date %}{% endif %} + {% if page.date %}{% endif %}
    {% endif %} -

    {{ page.title }}

    +

    {{ page.title }}

    diff --git a/_sass/_page-header.scss b/_sass/_page-header.scss new file mode 100644 index 0000000..b036d9d --- /dev/null +++ b/_sass/_page-header.scss @@ -0,0 +1,223 @@ +/* ============================================================ + .page-header — Unified BEM Component + Variants: --hero, --plain, --article, --split + ============================================================ */ + +/* ------------------------------------------------------------ + Base + ------------------------------------------------------------ */ +.page-header { + background: var(--color-bg-warm); + border-bottom: 1px solid var(--color-border); + padding: 80px var(--container-padding) 56px; + + /* --plain: no background, no border (downloads) */ + &--plain { + background: transparent; + border-bottom: none; + } + + /* --hero: larger padding, tighter heading line-height */ + &--hero { + padding-top: 88px; + padding-bottom: 100px; + } + + /* --article: tighter top padding, used in post layout */ + &--article { + padding-top: 64px; + padding-bottom: 56px; + } + + /* --split: flex split with aside on right */ + &--split &__inner { + display: flex; + align-items: flex-end; + justify-content: space-between; + gap: 40px; + } +} + +/* ------------------------------------------------------------ + Inner Container + ------------------------------------------------------------ */ +.page-header__inner { + max-width: var(--container-max-width); + margin: 0 auto; +} + +/* Left column in split layouts (implicit — no special style needed) */ +.page-header__content { + min-width: 0; +} + +/* Right column in split layouts */ +.page-header__aside { + flex-shrink: 0; + padding-bottom: 4px; +} + +/* ------------------------------------------------------------ + Eyebrow + ------------------------------------------------------------ */ +.page-header__eyebrow { + display: flex; + align-items: center; + gap: 8px; + font-family: var(--font-heading); + font-size: 12px; + font-weight: 500; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-red); + margin-bottom: 20px; +} + +.page-header__eyebrow-dot { + width: 8px; + height: 8px; + border-radius: 50%; + background: var(--color-red); + flex-shrink: 0; +} + +/* ------------------------------------------------------------ + Heading + ------------------------------------------------------------ */ +.page-header__heading { + font-family: var(--font-heading); + font-size: 56px; + font-weight: 700; + letter-spacing: -0.03em; + line-height: 1.1; + color: var(--color-black); + margin-bottom: 20px; + + .page-header--hero & { + font-size: 64px; + line-height: 1.0; + margin-bottom: 28px; + } + + .page-header--article & { + margin-bottom: 0; + max-width: 800px; + } +} + +/* ------------------------------------------------------------ + Description + ------------------------------------------------------------ */ +.page-header__description { + font-size: 17px; + line-height: 1.65; + color: var(--color-muted); + max-width: 560px; + + .page-header--hero & { + max-width: 460px; + margin-bottom: 40px; + } + + a { + color: var(--color-red); + transition: opacity 0.15s ease; + + &:hover { + opacity: 0.75; + } + } +} + +/* ------------------------------------------------------------ + Actions (hero CTA buttons) + ------------------------------------------------------------ */ +.page-header__actions { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; +} + +/* ------------------------------------------------------------ + Meta line (article layout: category · sep · date) + ------------------------------------------------------------ */ +.page-header__meta { + display: flex; + align-items: center; + gap: 10px; + font-size: 13px; + line-height: 1; + margin-bottom: 24px; +} + +.page-header__meta-category { + font-weight: 500; + color: var(--color-muted); +} + +.page-header__meta-sep { + color: var(--color-muted-secondary); +} + +.page-header__meta-date { + color: var(--color-muted); +} + +/* ------------------------------------------------------------ + Responsive — ≤1024px + ------------------------------------------------------------ */ +@media (max-width: 1024px) { + .page-header--hero .page-header__heading { + font-size: 48px; + } + + .page-header__heading { + font-size: 40px; + } + + .page-header--split .page-header__inner { + flex-direction: column; + align-items: flex-start; + gap: 24px; + } +} + +/* ------------------------------------------------------------ + Responsive — ≤768px + ------------------------------------------------------------ */ +@media (max-width: 768px) { + .page-header--hero { + padding: 56px var(--container-padding) 64px; + } + + .page-header--hero .page-header__heading { + font-size: 36px; + } + + .page-header__heading { + font-size: 32px; + } + + .page-header--hero .page-header__actions { + flex-direction: column; + align-items: stretch; + } + + .page-header--hero .page-header__actions .btn { + justify-content: center; + } + + .page-header__aside { + padding-bottom: 0; + } +} + +/* ------------------------------------------------------------ + Responsive — ≤480px + ------------------------------------------------------------ */ +@media (max-width: 480px) { + .page-header__heading { + font-size: 28px; + } +} diff --git a/about/index.html b/about/index.html index a7831d6..72d6b73 100644 --- a/about/index.html +++ b/about/index.html @@ -3,14 +3,14 @@ title: mruby — About --- -
    -
    +
    {% include footer.html %} diff --git a/_layouts/post.html b/_layouts/post.html index 5454fd4..0bcffc1 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -5,7 +5,7 @@ {% include redesign_nav.html %} -
    +
    {% assign first_cat = page.categories | first %} @@ -53,6 +53,11 @@

    {{ page.title }}

    } // TOC generation + // Add role="list" to article lists (VoiceOver Safari removes list semantics with list-style:none) + document.querySelectorAll('.article-content ul, .article-content ol').forEach(function (el) { + el.setAttribute('role', 'list'); + }); + var content = document.querySelector('.article-content'); var tocNav = document.getElementById('article-toc-nav'); var tocAside = document.getElementById('article-toc'); @@ -66,6 +71,7 @@

    {{ page.title }}

    var list = document.createElement('ul'); list.className = 'article-toc__list'; + list.setAttribute('role', 'list'); headings.forEach(function (h) { if (!h.id) return; var li = document.createElement('li'); diff --git a/_layouts/redesign.html b/_layouts/redesign.html index cdfee95..db032cf 100644 --- a/_layouts/redesign.html +++ b/_layouts/redesign.html @@ -5,7 +5,7 @@ {% include redesign_nav.html %} -
    +
    {{ content }}
    {% include redesign_footer.html %} diff --git a/_sass/_article.scss b/_sass/_article.scss index 6eade9d..0e43e35 100644 --- a/_sass/_article.scss +++ b/_sass/_article.scss @@ -132,6 +132,9 @@ .article-content a { color: var(--color-red); + text-decoration: underline; + text-decoration-color: currentColor; + text-underline-offset: 2px; transition: opacity 0.15s ease; } @@ -139,6 +142,16 @@ opacity: 0.75; } +.article-content a:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + +.article-toc__link:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .article-content ul, .article-content ol { list-style: none; diff --git a/_sass/_buttons.scss b/_sass/_buttons.scss index bea6afb..6325bf6 100644 --- a/_sass/_buttons.scss +++ b/_sass/_buttons.scss @@ -38,3 +38,8 @@ background: var(--color-hover-overlay); color: var(--color-black); } + +.btn:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} diff --git a/_sass/_documentation.scss b/_sass/_documentation.scss index 6b0a52a..dbf5c1b 100644 --- a/_sass/_documentation.scss +++ b/_sass/_documentation.scss @@ -128,6 +128,12 @@ background: var(--color-bg-warm); } +.docs-article-row:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: -2px; + background: var(--color-bg-warm); +} + .docs-article-row__info { display: flex; flex-direction: column; @@ -177,6 +183,16 @@ opacity: 0.88; } +.docs-component-card:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: -2px; +} + +.docs-source-note__link:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .docs-component-card--warm { background: var(--color-bg-warm); } diff --git a/_sass/_downloads.scss b/_sass/_downloads.scss index 52827d3..208345d 100644 --- a/_sass/_downloads.scss +++ b/_sass/_downloads.scss @@ -121,6 +121,11 @@ color: var(--color-white); } +.download-btn:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .download-more { display: flex; align-items: center; @@ -279,6 +284,11 @@ opacity: 0.75; } +.release-row__link:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + @media (max-width: 1024px) { .release-card { gap: 48px; diff --git a/_sass/_footer.scss b/_sass/_footer.scss index 36f7fd1..af6981d 100644 --- a/_sass/_footer.scss +++ b/_sass/_footer.scss @@ -45,6 +45,12 @@ color: var(--color-footer-muted-hover); } +.site-footer__attribution a:focus-visible, +.site-footer__feeds a:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + @media (max-width: 768px) { .site-footer__inner { flex-direction: column; diff --git a/_sass/_latest-news.scss b/_sass/_latest-news.scss index 7474777..b59bd24 100644 --- a/_sass/_latest-news.scss +++ b/_sass/_latest-news.scss @@ -35,6 +35,11 @@ opacity: 0.75; } +.latest-news__all-link:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .latest-news__divider { height: 1px; background: var(--color-border); @@ -59,6 +64,12 @@ background: var(--color-bg-warm); } +.news-card:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: -2px; + background: var(--color-bg-warm); +} + .news-card + .news-card { border-left: none; } diff --git a/_sass/_navigation.scss b/_sass/_navigation.scss index b99d0d7..fdbfd16 100644 --- a/_sass/_navigation.scss +++ b/_sass/_navigation.scss @@ -1,3 +1,20 @@ +.skip-link { + position: absolute; + top: -100%; + left: 0; + z-index: 1000; + padding: 8px 16px; + background: var(--color-red); + color: var(--color-white); + font-size: 14px; + font-weight: 600; + text-decoration: none; +} + +.skip-link:focus { + top: 0; +} + .site-nav { position: sticky; top: 0; @@ -64,6 +81,12 @@ background: var(--color-bg-warm); } +.site-nav__links a:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; + color: var(--color-black); +} + .site-nav__links a[aria-current="page"] { color: var(--color-black); font-weight: 600; @@ -93,6 +116,16 @@ background: var(--color-bg-warm); } +.site-nav__hamburger:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + +.site-nav__brand:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .site-nav__hamburger span { display: block; width: 20px; diff --git a/_sass/_reset.scss b/_sass/_reset.scss index 02b3e80..d90ab47 100644 --- a/_sass/_reset.scss +++ b/_sass/_reset.scss @@ -41,3 +41,14 @@ img { ul { list-style: none; } + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} diff --git a/_sass/_team.scss b/_sass/_team.scss index 6fee097..e45cee7 100644 --- a/_sass/_team.scss +++ b/_sass/_team.scss @@ -11,6 +11,11 @@ opacity: 0.75; } +.team-header__link:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} + .team-section__inner { max-width: var(--container-max-width); margin: 0 auto; @@ -67,6 +72,12 @@ background: var(--color-bg-warm); } +.team-member:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: -2px; + background: var(--color-bg-warm); +} + .team-member__avatar { width: 72px; height: 72px; @@ -144,3 +155,8 @@ .team-developers__more:hover { opacity: 0.75; } + +.team-developers__more:focus-visible { + outline: 2px solid var(--color-red); + outline-offset: 2px; +} diff --git a/_sass/_variables.scss b/_sass/_variables.scss index aa6a2c7..763482f 100644 --- a/_sass/_variables.scss +++ b/_sass/_variables.scss @@ -8,12 +8,12 @@ --color-border: #e0dbd5; --color-border-dark: #222222; --color-muted: #6b6560; - --color-muted-secondary: #9d9894; + --color-muted-secondary: #736e69; --color-text-body: #3d3a37; --color-hover-overlay: rgba(0, 0, 0, 0.02); --color-nav-shadow: rgba(0, 0, 0, 0.08); - --color-footer-muted: #5a5550; - --color-footer-muted-hover: #8a8580; + --color-footer-muted: #8a8580; + --color-footer-muted-hover: #b0aca8; --font-heading: 'Space Grotesk', system-ui, sans-serif; --font-body: 'Inter', system-ui, sans-serif; diff --git a/assets/css/main.css b/assets/css/main.css index 7520293..339fd9c 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -83,7 +83,7 @@ a { } .navbar-mruby .navbar-link:hover { color: #f00; - background-color: 000; + background-color: #000; } @media (max-width: 950px) { diff --git a/downloads/index.html b/downloads/index.html index 354646e..b87ced4 100644 --- a/downloads/index.html +++ b/downloads/index.html @@ -44,14 +44,14 @@

    Get mruby

    Source .zip mruby-{{ current.version }}.zip · via GitHub
    -
    Download + Download
    Source .tar.gz mruby-{{ current.version }}.tar.gz · via GitHub
    - Download + Download
    More assets and checksums available on diff --git a/libraries/index.html b/libraries/index.html index 6634cd8..649af8f 100644 --- a/libraries/index.html +++ b/libraries/index.html @@ -43,7 +43,7 @@

    mrbgems

    autocomplete="off" >
    - Showing {{ total }} libraries + Showing {{ total }} libraries
    diff --git a/team/index.html b/team/index.html index ede8cd8..4313fbc 100644 --- a/team/index.html +++ b/team/index.html @@ -24,7 +24,7 @@

    The people behind mruby

    - Organization Members +

    Organization Members

    {%- for member in site.data.team -%} @@ -46,7 +46,7 @@

    The people behind mruby

    - mruby Developers +

    mruby Developers

    — from the AUTHORS file
    From e07f3d4fb6b5f81e8a073492a4a12823c6e572fa Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 19:39:32 +0100 Subject: [PATCH 23/40] Build docs/api via Rake --- .gitignore | 1 + Gemfile | 1 + Gemfile.lock | 2 + Rakefile | 128 + _data/mgems.yml | 737 +- docs/api/.nojekyll | 0 docs/api/Addrinfo.html | 1566 --- docs/api/ArgumentError.html | 145 - docs/api/Array.html | 3981 -------- docs/api/BasicObject.html | 186 - docs/api/BasicSocket.html | 686 -- docs/api/CMath.html | 928 -- docs/api/Comparable.html | 767 -- docs/api/Complex.html | 1069 -- docs/api/Dir.html | 633 -- docs/api/EOFError.html | 136 - docs/api/Enumerable.html | 4937 --------- docs/api/Enumerator.html | 1754 ---- docs/api/Enumerator/Chain.html | 535 - docs/api/Enumerator/Generator.html | 321 - docs/api/Enumerator/Lazy.html | 1154 --- docs/api/Enumerator/Yielder.html | 351 - docs/api/Errno.html | 321 - docs/api/Exception.html | 195 - docs/api/File.html | 1630 --- docs/api/File/Constants.html | 150 - docs/api/Float.html | 262 - docs/api/FloatDomainError.html | 136 - docs/api/FrozenError.html | 128 - docs/api/Hash.html | 3115 ------ docs/api/IO.html | 1179 --- docs/api/IOError.html | 147 - docs/api/IPSocket.html | 408 - docs/api/IndexError.html | 145 - docs/api/Integer.html | 1004 -- docs/api/Kernel.html | 591 -- docs/api/KeyError.html | 136 - docs/api/LocalJumpError.html | 141 - docs/api/Math.html | 2725 ----- docs/api/Method.html | 304 - docs/api/Module.html | 698 -- docs/api/NameError.html | 313 - docs/api/NoMethodError.html | 324 - docs/api/NotImplementedError.html | 128 - docs/api/Numeric.html | 920 -- docs/api/ObjectSpace.html | 109 - docs/api/Proc.html | 500 - docs/api/Range.html | 1062 -- docs/api/RangeError.html | 145 - docs/api/Rational.html | 328 - docs/api/RegexpError.html | 141 - docs/api/Set.html | 3239 ------ docs/api/Socket.html | 1117 -- docs/api/SocketError.html | 128 - docs/api/StopIteration.html | 218 - docs/api/String.html | 2828 ------ docs/api/Struct.html | 487 - docs/api/Symbol.html | 668 -- docs/api/TCPServer.html | 524 - docs/api/TCPSocket.html | 374 - docs/api/TypeError.html | 141 - docs/api/UDPSocket.html | 555 - docs/api/UNIXServer.html | 523 - docs/api/UNIXSocket.html | 584 -- docs/api/UncaughtThrowError.html | 382 - docs/api/ZeroDivisionError.html | 141 - docs/api/_index.html | 656 -- docs/api/class_list.html | 62 - docs/api/css/common.css | 1 - docs/api/css/full_list.css | 58 - docs/api/css/mruby.css | 0 docs/api/css/style.css | 503 - docs/api/file.AUTHORS.html | 90 - docs/api/file.CONTRIBUTING.html | 255 - docs/api/file.LEGAL.html | 116 - docs/api/file.LICENSE.html | 82 - docs/api/file.NEWS.html | 558 - docs/api/file.README.html | 185 - docs/api/file.SECURITY.html | 100 - docs/api/file.TODO.html | 94 - docs/api/file.boxing.html | 193 - docs/api/file.compile.html | 674 -- docs/api/file.debugger.html | 448 - docs/api/file.gc-arena-howto.html | 197 - docs/api/file.hier.html | 134 - docs/api/file.limitations.html | 233 - docs/api/file.link.html | 152 - docs/api/file.memory.html | 99 - docs/api/file.mrbconf.html | 394 - docs/api/file.mrbgems.html | 479 - docs/api/file.mruby3.0.html | 282 - docs/api/file.mruby3.1.html | 407 - docs/api/file.mruby3.2.html | 185 - docs/api/file.mruby3.3.html | 385 - docs/api/file.mruby3.4.html | 556 - docs/api/file.opcode.html | 746 -- docs/api/file.symbol.html | 149 - docs/api/file_list.html | 187 - docs/api/frames.html | 22 - docs/api/function_list.html | 2694 ----- docs/api/header_list.html | 329 - docs/api/headers.html | 156 - docs/api/headers/mrbconf.h.html | 212 - docs/api/headers/mruby.h.html | 9033 ----------------- docs/api/headers/mruby_2Farray.h.html | 1934 ---- docs/api/headers/mruby_2Fboxing_nan.h.html | 201 - docs/api/headers/mruby_2Fboxing_no.h.html | 237 - docs/api/headers/mruby_2Fboxing_word.h.html | 301 - docs/api/headers/mruby_2Fclass.h.html | 413 - docs/api/headers/mruby_2Fcommon.h.html | 223 - docs/api/headers/mruby_2Fcompile.h.html | 753 -- docs/api/headers/mruby_2Fdata.h.html | 322 - docs/api/headers/mruby_2Fdebug.h.html | 320 - docs/api/headers/mruby_2Fdump.h.html | 428 - docs/api/headers/mruby_2Fendian.h.html | 130 - docs/api/headers/mruby_2Ferror.h.html | 576 -- docs/api/headers/mruby_2Fext_2Fio.h.html | 96 - docs/api/headers/mruby_2Fgc.h.html | 193 - docs/api/headers/mruby_2Fhash.h.html | 1655 --- docs/api/headers/mruby_2Finternal.h.html | 106 - docs/api/headers/mruby_2Firep.h.html | 445 - docs/api/headers/mruby_2Fistruct.h.html | 216 - docs/api/headers/mruby_2Fkhash.h.html | 348 - docs/api/headers/mruby_2Fmempool.h.html | 253 - docs/api/headers/mruby_2Fnumeric.h.html | 452 - docs/api/headers/mruby_2Fobject.h.html | 136 - docs/api/headers/mruby_2Fopcode.h.html | 350 - docs/api/headers/mruby_2Fpresym.h.html | 96 - .../headers/mruby_2Fpresym_2Fdisable.h.html | 251 - .../headers/mruby_2Fpresym_2Fenable.h.html | 186 - .../headers/mruby_2Fpresym_2Fscanning.h.html | 186 - docs/api/headers/mruby_2Fproc.h.html | 668 -- docs/api/headers/mruby_2Frange.h.html | 320 - docs/api/headers/mruby_2Fre.h.html | 101 - docs/api/headers/mruby_2Fstring.h.html | 2221 ---- docs/api/headers/mruby_2Fthrow.h.html | 131 - docs/api/headers/mruby_2Ftime.h.html | 132 - docs/api/headers/mruby_2Fvalue.h.html | 1125 -- docs/api/headers/mruby_2Fvariable.h.html | 974 -- docs/api/headers/mruby_2Fversion.h.html | 435 - docs/api/index.html | 185 - docs/api/js/app.js | 344 - docs/api/js/full_list.js | 242 - docs/api/js/jquery.js | 4 - docs/api/js/mruby.js | 0 docs/api/method_list.html | 3974 -------- docs/api/top-level-namespace.html | 142 - 147 files changed, 550 insertions(+), 91673 deletions(-) create mode 100644 Rakefile delete mode 100644 docs/api/.nojekyll delete mode 100644 docs/api/Addrinfo.html delete mode 100644 docs/api/ArgumentError.html delete mode 100644 docs/api/Array.html delete mode 100644 docs/api/BasicObject.html delete mode 100644 docs/api/BasicSocket.html delete mode 100644 docs/api/CMath.html delete mode 100644 docs/api/Comparable.html delete mode 100644 docs/api/Complex.html delete mode 100644 docs/api/Dir.html delete mode 100644 docs/api/EOFError.html delete mode 100644 docs/api/Enumerable.html delete mode 100644 docs/api/Enumerator.html delete mode 100644 docs/api/Enumerator/Chain.html delete mode 100644 docs/api/Enumerator/Generator.html delete mode 100644 docs/api/Enumerator/Lazy.html delete mode 100644 docs/api/Enumerator/Yielder.html delete mode 100644 docs/api/Errno.html delete mode 100644 docs/api/Exception.html delete mode 100644 docs/api/File.html delete mode 100644 docs/api/File/Constants.html delete mode 100644 docs/api/Float.html delete mode 100644 docs/api/FloatDomainError.html delete mode 100644 docs/api/FrozenError.html delete mode 100644 docs/api/Hash.html delete mode 100644 docs/api/IO.html delete mode 100644 docs/api/IOError.html delete mode 100644 docs/api/IPSocket.html delete mode 100644 docs/api/IndexError.html delete mode 100644 docs/api/Integer.html delete mode 100644 docs/api/Kernel.html delete mode 100644 docs/api/KeyError.html delete mode 100644 docs/api/LocalJumpError.html delete mode 100644 docs/api/Math.html delete mode 100644 docs/api/Method.html delete mode 100644 docs/api/Module.html delete mode 100644 docs/api/NameError.html delete mode 100644 docs/api/NoMethodError.html delete mode 100644 docs/api/NotImplementedError.html delete mode 100644 docs/api/Numeric.html delete mode 100644 docs/api/ObjectSpace.html delete mode 100644 docs/api/Proc.html delete mode 100644 docs/api/Range.html delete mode 100644 docs/api/RangeError.html delete mode 100644 docs/api/Rational.html delete mode 100644 docs/api/RegexpError.html delete mode 100644 docs/api/Set.html delete mode 100644 docs/api/Socket.html delete mode 100644 docs/api/SocketError.html delete mode 100644 docs/api/StopIteration.html delete mode 100644 docs/api/String.html delete mode 100644 docs/api/Struct.html delete mode 100644 docs/api/Symbol.html delete mode 100644 docs/api/TCPServer.html delete mode 100644 docs/api/TCPSocket.html delete mode 100644 docs/api/TypeError.html delete mode 100644 docs/api/UDPSocket.html delete mode 100644 docs/api/UNIXServer.html delete mode 100644 docs/api/UNIXSocket.html delete mode 100644 docs/api/UncaughtThrowError.html delete mode 100644 docs/api/ZeroDivisionError.html delete mode 100644 docs/api/_index.html delete mode 100644 docs/api/class_list.html delete mode 100644 docs/api/css/common.css delete mode 100644 docs/api/css/full_list.css delete mode 100644 docs/api/css/mruby.css delete mode 100644 docs/api/css/style.css delete mode 100644 docs/api/file.AUTHORS.html delete mode 100644 docs/api/file.CONTRIBUTING.html delete mode 100644 docs/api/file.LEGAL.html delete mode 100644 docs/api/file.LICENSE.html delete mode 100644 docs/api/file.NEWS.html delete mode 100644 docs/api/file.README.html delete mode 100644 docs/api/file.SECURITY.html delete mode 100644 docs/api/file.TODO.html delete mode 100644 docs/api/file.boxing.html delete mode 100644 docs/api/file.compile.html delete mode 100644 docs/api/file.debugger.html delete mode 100644 docs/api/file.gc-arena-howto.html delete mode 100644 docs/api/file.hier.html delete mode 100644 docs/api/file.limitations.html delete mode 100644 docs/api/file.link.html delete mode 100644 docs/api/file.memory.html delete mode 100644 docs/api/file.mrbconf.html delete mode 100644 docs/api/file.mrbgems.html delete mode 100644 docs/api/file.mruby3.0.html delete mode 100644 docs/api/file.mruby3.1.html delete mode 100644 docs/api/file.mruby3.2.html delete mode 100644 docs/api/file.mruby3.3.html delete mode 100644 docs/api/file.mruby3.4.html delete mode 100644 docs/api/file.opcode.html delete mode 100644 docs/api/file.symbol.html delete mode 100644 docs/api/file_list.html delete mode 100644 docs/api/frames.html delete mode 100644 docs/api/function_list.html delete mode 100644 docs/api/header_list.html delete mode 100644 docs/api/headers.html delete mode 100644 docs/api/headers/mrbconf.h.html delete mode 100644 docs/api/headers/mruby.h.html delete mode 100644 docs/api/headers/mruby_2Farray.h.html delete mode 100644 docs/api/headers/mruby_2Fboxing_nan.h.html delete mode 100644 docs/api/headers/mruby_2Fboxing_no.h.html delete mode 100644 docs/api/headers/mruby_2Fboxing_word.h.html delete mode 100644 docs/api/headers/mruby_2Fclass.h.html delete mode 100644 docs/api/headers/mruby_2Fcommon.h.html delete mode 100644 docs/api/headers/mruby_2Fcompile.h.html delete mode 100644 docs/api/headers/mruby_2Fdata.h.html delete mode 100644 docs/api/headers/mruby_2Fdebug.h.html delete mode 100644 docs/api/headers/mruby_2Fdump.h.html delete mode 100644 docs/api/headers/mruby_2Fendian.h.html delete mode 100644 docs/api/headers/mruby_2Ferror.h.html delete mode 100644 docs/api/headers/mruby_2Fext_2Fio.h.html delete mode 100644 docs/api/headers/mruby_2Fgc.h.html delete mode 100644 docs/api/headers/mruby_2Fhash.h.html delete mode 100644 docs/api/headers/mruby_2Finternal.h.html delete mode 100644 docs/api/headers/mruby_2Firep.h.html delete mode 100644 docs/api/headers/mruby_2Fistruct.h.html delete mode 100644 docs/api/headers/mruby_2Fkhash.h.html delete mode 100644 docs/api/headers/mruby_2Fmempool.h.html delete mode 100644 docs/api/headers/mruby_2Fnumeric.h.html delete mode 100644 docs/api/headers/mruby_2Fobject.h.html delete mode 100644 docs/api/headers/mruby_2Fopcode.h.html delete mode 100644 docs/api/headers/mruby_2Fpresym.h.html delete mode 100644 docs/api/headers/mruby_2Fpresym_2Fdisable.h.html delete mode 100644 docs/api/headers/mruby_2Fpresym_2Fenable.h.html delete mode 100644 docs/api/headers/mruby_2Fpresym_2Fscanning.h.html delete mode 100644 docs/api/headers/mruby_2Fproc.h.html delete mode 100644 docs/api/headers/mruby_2Frange.h.html delete mode 100644 docs/api/headers/mruby_2Fre.h.html delete mode 100644 docs/api/headers/mruby_2Fstring.h.html delete mode 100644 docs/api/headers/mruby_2Fthrow.h.html delete mode 100644 docs/api/headers/mruby_2Ftime.h.html delete mode 100644 docs/api/headers/mruby_2Fvalue.h.html delete mode 100644 docs/api/headers/mruby_2Fvariable.h.html delete mode 100644 docs/api/headers/mruby_2Fversion.h.html delete mode 100644 docs/api/index.html delete mode 100644 docs/api/js/app.js delete mode 100644 docs/api/js/full_list.js delete mode 100644 docs/api/js/jquery.js delete mode 100644 docs/api/js/mruby.js delete mode 100644 docs/api/method_list.html delete mode 100644 docs/api/top-level-namespace.html diff --git a/.gitignore b/.gitignore index 0e48758..99674dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ _site mruby +/docs/api/ /.bundle/ /vendor/ .worktrees diff --git a/Gemfile b/Gemfile index 3586421..e346ee9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,6 @@ source 'https://rubygems.org' +gem 'rake' gem 'github-pages', group: :jekyll_plugins group :jekyll_plugins do diff --git a/Gemfile.lock b/Gemfile.lock index 6848599..e9ea7a4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -258,6 +258,7 @@ GEM track_open_instances (~> 0.1) public_suffix (5.1.1) racc (1.8.1) + rake (13.3.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) @@ -304,6 +305,7 @@ DEPENDENCIES jekyll-feed jekyll-sitemap mgem + rake yard-coderay yard-mruby diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..99e5806 --- /dev/null +++ b/Rakefile @@ -0,0 +1,128 @@ +namespace :gen do + desc 'Regenerate mrbgem library data (_data/mgems.yml)' + task :mgemdata do + require 'mgem' + require 'yaml' + + class File + class << self + alias_method :exists?, :exist? unless method_defined?(:exists?) + end + end + + include Mrbgem + mgems = load_gems + mgems.update! + + mgem_info = mgems.map do |mgem| + { + 'name' => mgem.name, + 'description' => mgem.description, + 'author' => mgem.author, + 'website' => mgem.website, + 'protocol' => mgem.protocol, + 'repository' => mgem.repository, + 'repooptions' => mgem.repooptions + } + end + + mgem_info.sort_by! { |g| g['name'].downcase } + + File.open('_data/mgems.yml', 'w') { |f| f.write(mgem_info.to_yaml) } + puts 'Written _data/mgems.yml' + end + + desc 'Regenerate API documentation from mruby source (clones latest release into mruby/)' + task :mrbdoc do + require 'json' + + # Resolve latest stable release tag via gh CLI (mruby uses tags, not GitHub Releases) + tags = JSON.parse(`gh api 'repos/mruby/mruby/tags?per_page=100'`) + tag = tags.map { |t| t['name'] }.find { |n| n.match?(/^\d+\.\d+\.\d+$/) } + raise "Could not determine latest stable mruby release tag" unless tag + puts "Latest mruby release: #{tag}" + + # Clone mruby at the release tag (or skip if already at the right version) + mruby_dir = File.join(__dir__, 'mruby') + if Dir.exist?(mruby_dir) + current_tag = `git -C #{mruby_dir} describe --exact-match HEAD 2>/dev/null`.strip + if current_tag == tag + puts "mruby #{tag} already cloned, skipping clone" + else + puts "mruby dir exists at #{current_tag.empty? ? 'unknown version' : current_tag}, re-cloning at #{tag}" + FileUtils.rm_rf(mruby_dir) + sh "git clone --depth 1 --branch #{tag} https://github.com/mruby/mruby.git #{mruby_dir}" + end + else + sh "git clone --depth 1 --branch #{tag} https://github.com/mruby/mruby.git #{mruby_dir}" + end + + # Run mrbdoc (from yard-mruby) in the mruby directory — equivalent to doc:api + Dir.chdir(mruby_dir) do + sh "BUNDLE_GEMFILE=#{__dir__}/Gemfile bundle exec mrbdoc" + end + + # Copy generated docs into our docs/api/ directory + dest = File.join(__dir__, 'docs', 'api') + FileUtils.mkdir_p(dest) + FileUtils.cp_r(Dir.glob("#{mruby_dir}/doc/api/*"), dest) + puts "Copied mruby API docs to docs/api/" + end + + desc 'Regenerate release data from GitHub API (_data/releases.yml)' + task :releasedata do + require 'json' + require 'shellwords' + require 'yaml' + + repo = 'mruby/mruby' + data_file = File.join(__dir__, '_data', 'releases.yml') + + gh_api = lambda { |path| JSON.parse(`gh api #{Shellwords.escape(path)}`) } + + post_dates = {} + Dir.glob(File.join(__dir__, '_posts', '*.{markdown,md}')).each do |f| + if (m = File.basename(f).match(/^(\d{4}-\d{2}-\d{2})-mruby-([\d.]+)-released/)) + post_dates[m[2]] = m[1] + end + end + + tags = [] + page = 1 + loop do + batch = gh_api.call("/repos/#{repo}/tags?per_page=100&page=#{page}") + break if batch.empty? + tags.concat(batch) + break if batch.size < 100 + page += 1 + end + + versioned = tags.select { |t| t['name'].match?(/^\d/) } + + releases = versioned.map do |tag| + version = tag['name'] + prerelease = !version.match?(/^\d+\.\d+\.\d+$/) + date = post_dates[version] || begin + commit = gh_api.call("/repos/#{repo}/commits/#{tag['commit']['sha']}") + commit.dig('commit', 'committer', 'date')&.slice(0, 10) + end + puts " #{version}: #{date}#{' (prerelease)' if prerelease}" + { 'version' => version, 'date' => date, 'prerelease' => prerelease } + end + + File.write(data_file, releases.to_yaml) + puts "\nWritten #{releases.size} releases to #{data_file}" + end +end + +desc 'Build the Jekyll site' +task build: %w[gen:mgemdata gen:mrbdoc gen:releasedata] do + sh 'bundle exec jekyll build' +end + +desc 'Serve the Jekyll site locally with live reload' +task :serve do + sh 'bundle exec jekyll serve' +end + +task default: :build diff --git a/_data/mgems.yml b/_data/mgems.yml index fce6e93..40df04a 100644 --- a/_data/mgems.yml +++ b/_data/mgems.yml @@ -5,49 +5,49 @@ website: https://github.com/k0u5uk3/mruby-alarm protocol: git repository: https://github.com/k0u5uk3/mruby-alarm.git - repooptions: + repooptions: - name: mruby-allegro description: mruby binding to Allegro 5 author: cremno website: https://github.com/cremno/mruby-allegro protocol: git repository: https://github.com/cremno/mruby-allegro.git - repooptions: + repooptions: - name: mruby-allocate description: Class allocate author: ppibburr website: https://github.com/ppibburr/mruby-allocate protocol: git repository: https://github.com/ppibburr/mruby-allocate.git - repooptions: + repooptions: - name: mruby-ansi-colors description: Extends String class to use ANSI color escape codes. author: Mav7 website: https://github.com/mruby-Forum/mruby-ansi-colors protocol: git repository: https://github.com/mruby-Forum/mruby-ansi-colors.git - repooptions: + repooptions: - name: mruby-apr description: Cross platform standard library components à la MRI author: Jared Breeden website: https://github.com/jbreeden/mruby-apr protocol: git repository: https://github.com/jbreeden/mruby-apr.git - repooptions: + repooptions: - name: mruby-arduino description: Arduino binding author: kyab website: https://github.com/kyab/mruby-arduino protocol: git repository: https://github.com/kyab/mruby-arduino.git - repooptions: + repooptions: - name: mruby-argon2 description: The password hash Argon2, winner of PHC for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-argon2 protocol: git repository: https://github.com/Asmod4n/mruby-argon2.git - repooptions: + repooptions: - name: mruby-argtable description: Argtable class author: @@ -56,42 +56,42 @@ website: https://github.com/udzura/mruby-argtable protocol: git repository: https://github.com/udzura/mruby-argtable.git - repooptions: + repooptions: - name: mruby-at_exit description: Kernel.at_exit method author: ksss website: https://github.com/ksss/mruby-at_exit protocol: git repository: https://github.com/ksss/mruby-at_exit.git - repooptions: + repooptions: - name: mruby-audite description: Portable MP3 Player based on libmp123 and portaudio author: Matthias Georgi website: https://github.com/georgi/mruby-audite protocol: git repository: https://github.com/georgi/mruby-audite.git - repooptions: + repooptions: - name: mruby-augeas description: Bindings to augeas author: lutter website: https://github.com/hercules-team/mruby-augeas protocol: git repository: https://github.com/hercules-team/mruby-augeas - repooptions: + repooptions: - name: mruby-avl description: Avl Tree implementation author: randym website: https://github.com/randym/mruby-avl protocol: git repository: https://github.com/randym/mruby-avl.git - repooptions: + repooptions: - name: mruby-aws-s3 description: Client library for Amazon's (AWS) S3 REST API author: iij website: https://github.com/iij/mruby-aws-s3 protocol: git repository: https://github.com/iij/mruby-aws-s3.git - repooptions: + repooptions: - name: mruby-aws-sigv4 description: AWS Signature Version 4 signing library for mruby. mruby port of aws-sigv4 RubyGem. @@ -99,189 +99,231 @@ website: https://github.com/hfm/mruby-aws-sigv4 protocol: git repository: https://github.com/hfm/mruby-aws-sigv4.git - repooptions: + repooptions: - name: mruby-b64 description: Base64 for mruby with streaming interface author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-b64 protocol: git repository: https://github.com/Asmod4n/mruby-b64.git - repooptions: + repooptions: - name: mruby-backtrace description: Display backtrace author: crimsonwoods website: https://github.com/crimsonwoods/mruby-backtrace protocol: git repository: https://github.com/crimsonwoods/mruby-backtrace.git - repooptions: + repooptions: - name: mruby-base32 description: Base32 Encoder/Decoder author: qtakamitsu website: https://github.com/tk3/mruby-base32 protocol: git repository: https://github.com/tk3/mruby-base32.git - repooptions: + repooptions: - name: mruby-base58 description: Base58 Encoder/Decoder (third-party fork) author: h2so5 website: https://github.com/sadasant/mruby-base58 protocol: git repository: https://github.com/sadasant/mruby-base58.git - repooptions: + repooptions: - name: mruby-base64 description: Base64 Encoder/Decoder author: mattn website: https://github.com/mattn/mruby-base64 protocol: git repository: https://github.com/mattn/mruby-base64.git - repooptions: + repooptions: - name: mruby-bcrypt description: OpenBSD-style Blowfish-based password hashing author: Emanuele Vicentini website: https://github.com/baldowl/mruby-bcrypt protocol: git repository: https://github.com/baldowl/mruby-bcrypt.git - repooptions: + repooptions: - name: mruby-bignum description: Self-contained Bignum implementation for mruby author: Ray Chason website: https://github.com/chasonr/mruby-bignum protocol: git repository: https://github.com/chasonr/mruby-bignum.git - repooptions: + repooptions: +- name: mruby-bin-barista + description: A cross-platform build tool for executing a DAG of tasks + author: skinnyjames + website: https://github.com/skinnyjames/mruby-bin-barista + protocol: git + repository: https://github.com/skinnyjames/mruby-bin-barista.git + repooptions: - name: mruby-bin-mirb-hostbased description: Hostbased mirb for serial connection author: kyab website: https://github.com/kyab/mruby-bin-mirb-hostbased protocol: git repository: https://github.com/kyab/mruby-bin-mirb-hostbased.git - repooptions: + repooptions: +- name: mruby-bin-monolith + description: Tool to package mruby code in a single standalone executable + author: Chris Reuter + website: https://github.com/suetanvil/mruby-bin-monolith + protocol: git + repository: https://github.com/suetanvil/mruby-bin-monolith.git + repooptions: - name: mruby-bin-mruby-afl description: mruby interpreter in american fuzzy lop persistent mode author: Daniel Bovensiepen website: https://github.com/bovi/mruby-bin-mruby-afl protocol: git repository: https://github.com/bovi/mruby-bin-mruby-afl.git - repooptions: + repooptions: - name: mruby-bin-scite-mruby description: A SciTE based text editor with mruby scripting extension author: Takashi Sawanaka website: https://github.com/sdottaka/mruby-bin-scite-mruby protocol: git repository: https://github.com/sdottaka/mruby-bin-scite-mruby.git - repooptions: + repooptions: +- name: mruby-bin-theorem + description: A modern test library & runner toolkit for mruby + author: skinnyjames + website: https://github.com/skinnyjames/mruby-bin-theorem + protocol: git + repository: https://github.com/skinnyjames/mruby-bin-theorem.git + repooptions: - name: mruby-blendish description: Duangle OUI-blendish bindings. author: Corey Powell website: https://github.com/IceDragon200/mruby-blendish protocol: git repository: https://github.com/IceDragon200/mruby-blendish - repooptions: + repooptions: +- name: mruby-c-ares + description: Async DNS requests for mruby as a binding for https://c-ares.org/ + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-c-ares + protocol: git + repository: https://github.com/Asmod4n/mruby-c-ares.git + repooptions: - name: mruby-c-ext-helpers description: Helpers for mruby c extensions author: Asmod4n website: https://github.com/Asmod4n/mruby-c-ext-helpers protocol: git repository: https://github.com/Asmod4n/mruby-c-ext-helpers.git - repooptions: + repooptions: - name: mruby-cache description: mruby inter process share memory cache author: charlescui website: https://github.com/charlescui/mruby-cache protocol: git repository: https://github.com/charlescui/mruby-cache.git - repooptions: + repooptions: - name: mruby-capability description: Linux Capability Binding author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-capability protocol: git repository: https://github.com/matsumotory/mruby-capability.git - repooptions: + repooptions: - name: mruby-capacity description: mruby capacity interface author: pyama86 website: https://github.com/pyama86/mruby-capacity protocol: git repository: https://github.com/pyama86/mruby-capacity.git - repooptions: + repooptions: - name: mruby-catch-throw description: catch and throw for mruby. author: Corey Powell website: https://github.com/IceDragon200/mruby-catch-throw protocol: git repository: https://github.com/IceDragon200/mruby-catch-throw - repooptions: + repooptions: - name: mruby-cfunc description: Interface to C functions based on libffi. author: Yuichiro MASUI website: https://github.com/mrbgems/mruby-cfunc protocol: git repository: https://github.com/mrbgems/mruby-cfunc.git - repooptions: + repooptions: - name: mruby-cgroup description: cgroup binding author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-cgroup protocol: git repository: https://github.com/matsumotory/mruby-cgroup.git - repooptions: + repooptions: - name: mruby-changefinder description: Detect change point via continuous outlier and smoothing author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-changefinder protocol: git repository: https://github.com/matsumotory/mruby-changefinder.git - repooptions: + repooptions: - name: mruby-channel description: named FIFO queue with multithreading author: bggd website: https://github.com/bggd/mruby-channel protocol: git repository: https://github.com/bggd/mruby-channel.git - repooptions: + repooptions: - name: mruby-chipmunk2d description: chipmunk2d bindings author: Corey Powell website: https://github.com/IceDragon200/mruby-chipmunk2d protocol: git repository: https://github.com/IceDragon200/mruby-chipmunk2d - repooptions: + repooptions: - name: mruby-chrono description: Steady and System clocks for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-chrono protocol: git repository: https://github.com/Asmod4n/mruby-chrono.git - repooptions: + repooptions: - name: mruby-cipher description: OpenSSL Cipher wrapper author: Seiei Miyagi website: https://github.com/hanachin/mruby-cipher protocol: git repository: https://github.com/hanachin/mruby-cipher.git - repooptions: + repooptions: - name: mruby-clang-plugin description: clang plugin to check mruby API call mistakes. author: Takeshi Watanabe website: https://github.com/take-cheeze/mruby-clang-plugin protocol: git repository: https://github.com/take-cheeze/mruby-clang-plugin.git - repooptions: + repooptions: +- name: mruby-class-attribute + description: inheritable class attributes ported from Hanami + author: Hanami developers (ported by Paweł Świątkowski) + website: https://github.com/katafrakt/mruby-class-attribute + protocol: git + repository: https://github.com/katafrakt/mruby-class-attribute.git + repooptions: +- name: mruby-cmake-build + description: CMake configuration (CMakeLists.txt) generator for mruby. + author: Lanza Schneider + website: https://github.com/LanzaSchneider/mruby-cmake-build + protocol: git + repository: https://github.com/LanzaSchneider/mruby-cmake-build.git + repooptions: - name: mruby-cocoa description: Interface to Cocoa based on Objective-C Runtime and mruby-cfunc. author: Yuichiro MASUI website: https://github.com/mobiruby/mruby-cocoa protocol: git repository: https://github.com/mobiruby/mruby-cocoa.git - repooptions: + repooptions: - name: mruby-concurrently description: A concurrency framework based on fibers author: Christopher Aue website: https://github.com/christopheraue/m-ruby-concurrently protocol: git repository: https://github.com/christopheraue/m-ruby-concurrently.git - repooptions: + repooptions: - name: mruby-config description: With mruby we continuously switching between Ruby and C code. mruby-config gives you an easy way to maintain configuration values on both sides. @@ -289,196 +331,210 @@ website: https://github.com/matsumotory/mruby-config protocol: git repository: https://github.com/matsumotory/mruby-config.git - repooptions: + repooptions: - name: mruby-consul description: Consul HTTP API Client. author: Yohei Kawahara website: https://github.com/inokappa/mruby-consul protocol: git repository: https://github.com/inokappa/mruby-consul.git - repooptions: + repooptions: - name: mruby-correlation description: Array extended for correlation coefficient author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-correlation protocol: git repository: https://github.com/matsumotory/mruby-correlation.git - repooptions: + repooptions: +- name: mruby-cpuusage + description: X Platform CPU usage stats for mruby + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-cpuusage + protocol: git + repository: https://github.com/Asmod4n/mruby-cpuusage.git + repooptions: - name: mruby-crc description: Configurable general CRC calculator for mruby author: dearblue website: https://github.com/dearblue/mruby-crc protocol: git repository: https://github.com/dearblue/mruby-crc.git - repooptions: + repooptions: - name: mruby-criu description: CRIU, Checkpoint Restart In Userspace for Linux, class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-criu protocol: git repository: https://github.com/matsumotory/mruby-criu.git - repooptions: + repooptions: - name: mruby-cross-compile-on-mac-osx description: Cross compile osx, linux or win32 binary of mruby on Mac OSX author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-cross-compile-on-mac-osx protocol: git repository: https://github.com/matsumotory/mruby-cross-compile-on-mac-osx.git - repooptions: + repooptions: - name: mruby-curl description: CURL HTTP Client author: mattn website: https://github.com/mattn/mruby-curl protocol: git repository: https://github.com/mattn/mruby-curl.git - repooptions: + repooptions: - name: mruby-curses description: Curses for mruby. Links to NCurses or PDCurses. author: Jared Breeden website: https://github.com/jbreeden/mruby-curses protocol: git repository: https://github.com/jbreeden/mruby-curses.git - repooptions: -- name: mruby-czmq - description: mruby bindings for czmq. - author: Hendrik Beskow - website: https://github.com/Asmod4n/mruby-czmq - protocol: git - repository: https://github.com/Asmod4n/mruby-czmq.git - repooptions: + repooptions: +- name: mruby-cyberarm_engine + description: Yet another framework for building games with Gosu + author: cyberarm + website: https://github.com/cyberarm/cyberarm_engine + protocol: git + repository: https://github.com/cyberarm/cyberarm_engine.git + repooptions: - name: mruby-datadog description: Datadog API Client. author: Yohei Kawahara website: https://github.com/inokappa/mruby-datadog protocol: git repository: https://github.com/inokappa/mruby-datadog.git - repooptions: + repooptions: - name: mruby-delegate description: delegate implementation for mruby author: dearblue website: https://github.com/dearblue/mruby-delegate protocol: git repository: https://github.com/dearblue/mruby-delegate.git - repooptions: + repooptions: - name: mruby-digest description: MD5, RMD160, SHA1, SHA256, SHA384, SHA512 and HMAC Digests. author: Internet Initiative Japan., Inc. website: https://github.com/iij/mruby-digest protocol: git repository: https://github.com/iij/mruby-digest.git - repooptions: + repooptions: - name: mruby-dir description: Dir Class author: Internet Initiative Japan., Inc. website: https://github.com/iij/mruby-dir protocol: git repository: https://github.com/iij/mruby-dir.git - repooptions: + repooptions: - name: mruby-dir-glob description: File.fnmatch() & Dir.glob() author: Alexander Gromnitsky website: https://github.com/gromnitsky/mruby-dir-glob.git protocol: git repository: https://github.com/gromnitsky/mruby-dir-glob.git - repooptions: + repooptions: - name: mruby-discount description: HTML generator from Markdown using discount author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-discount protocol: git repository: https://github.com/matsumotory/mruby-discount.git - repooptions: + repooptions: - name: mruby-disque description: Disque client class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-disque protocol: git repository: https://github.com/matsumotory/mruby-disque.git - repooptions: + repooptions: - name: mruby-dll description: DLL Windows Support author: mattn website: https://github.com/mattn/mruby-dll protocol: git repository: https://github.com/mattn/mruby-dll.git - repooptions: + repooptions: - name: mruby-eject description: Eject CD-ROM author: mattn website: https://github.com/mattn/mruby-eject protocol: git repository: https://github.com/mattn/mruby-eject.git - repooptions: + repooptions: - name: mruby-env description: ENV class implementation author: iij website: https://github.com/iij/mruby-env protocol: git repository: https://github.com/iij/mruby-env.git - repooptions: + repooptions: - name: mruby-erb description: Port of CRuby's ERB author: Jared Breeden website: https://github.com/jbreeden/mruby-erb protocol: git repository: https://github.com/jbreeden/mruby-erb.git - repooptions: + repooptions: - name: mruby-errno description: Errno module author: iij website: https://github.com/iij/mruby-errno protocol: git repository: https://github.com/iij/mruby-errno.git - repooptions: + repooptions: - name: mruby-esp32-gpio description: GPIO library for ESP32 MCU author: YAMAMOTO Masaya website: https://github.com/mruby-esp32/mruby-esp32-gpio protocol: git repository: https://github.com/mruby-esp32/mruby-esp32-gpio.git - repooptions: + repooptions: - name: mruby-esp32-i2c description: I2C library for ESP32 MCU author: YAMAMOTO Masaya website: https://github.com/mruby-esp32/mruby-esp32-i2c protocol: git repository: https://github.com/mruby-esp32/mruby-esp32-i2c.git - repooptions: + repooptions: - name: mruby-esp32-system description: System library for ESP32 MCU author: Carson McDonald website: https://github.com/mruby-esp32/mruby-esp32-system protocol: git repository: https://github.com/mruby-esp32/mruby-esp32-system.git - repooptions: + repooptions: - name: mruby-esp32-wifi description: WIFI library for ESP32 MCU author: Carson McDonald website: https://github.com/mruby-esp32/mruby-esp32-wifi protocol: git repository: https://github.com/mruby-esp32/mruby-esp32-wifi.git - repooptions: + repooptions: - name: mruby-etcd description: Simple etcd API wrapper author: Uchio Kondo website: https://github.com/udzura/mruby-etcd protocol: git repository: https://github.com/udzura/mruby-etcd.git - repooptions: + repooptions: - name: mruby-eventfd description: Eventfd class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-eventfd protocol: git repository: https://github.com/matsumotory/mruby-eventfd.git - repooptions: + repooptions: - name: mruby-factory description: Factory implementation for mruby author: OKURA Masafumi website: https://github.com/okuramasafumi/mruby-factory protocol: git repository: https://github.com/okuramasafumi/mruby-factory.git - repooptions: + repooptions: +- name: mruby-fast-json + description: JSON Parsing and dumping for mruby, fast + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-fast-json + protocol: git + repository: https://github.com/Asmod4n/mruby-fast-json.git + repooptions: - name: mruby-fast-remote-check description: FastRemoteCheck can perform port listening check at high speed using raw socket @@ -486,133 +542,133 @@ website: https://github.com/matsumotory/mruby-fast-remote-check protocol: git repository: https://github.com/matsumotory/mruby-fast-remote-check.git - repooptions: + repooptions: - name: mruby-fiberpool description: mruby port of fiberpool author: mattn website: https://github.com/mattn/mruby-fiberpool protocol: git repository: https://github.com/mattn/mruby-fiberpool.git - repooptions: + repooptions: - name: mruby-file-access description: File access class author: takumakume website: https://github.com/takumakume/mruby-file-access protocol: git repository: https://github.com/takumakume/mruby-file-access.git - repooptions: + repooptions: - name: mruby-file-fnmatch description: File.fnmatch() author: katzer website: https://github.com/katzer/mruby-file-fnmatch protocol: git repository: https://github.com/katzer/mruby-file-fnmatch.git - repooptions: + repooptions: - name: mruby-file-stat description: File::Stat class implementation author: ksss website: https://github.com/ksss/mruby-file-stat protocol: git repository: https://github.com/ksss/mruby-file-stat.git - repooptions: + repooptions: - name: mruby-filemagic description: filemagic class implementation author: k0u5uk3 website: https://github.com/k0u5uk3/mruby-filemagic.git protocol: git repository: https://github.com/k0u5uk3/mruby-filemagic.git - repooptions: + repooptions: - name: mruby-float4 description: small vector classes for mruby author: Tomasz Dabrowski website: https://github.com/dabroz/mruby-float4 protocol: git repository: https://github.com/dabroz/mruby-float4.git - repooptions: + repooptions: - name: mruby-fltk3 description: FLTK3 GUI binding. author: mattn website: https://github.com/mattn/mruby-fltk3 protocol: git repository: https://github.com/mattn/mruby-fltk3.git - repooptions: + repooptions: - name: mruby-fluent-logger description: A structured logger for Fluentd. author: Kentaro Yoshida website: https://github.com/y-ken/fluent-logger-mruby protocol: git repository: https://github.com/y-ken/fluent-logger-mruby.git - repooptions: + repooptions: - name: mruby-forwardable description: forwardable module for mruby author: Masayoshi Takahashi website: https://github.com/takahashim/mruby-forwardable protocol: git repository: https://github.com/takahashim/mruby-forwardable.git - repooptions: + repooptions: - name: mruby-fsm description: Finite State Machine. author: Paolo Bosetti, University of Trento website: https://github.com/UniTN-Mechatronics/mruby-fsm protocol: git repository: https://github.com/UniTN-Mechatronics/mruby-fsm.git - repooptions: + repooptions: - name: mruby-ftp description: FTP client library. author: Paolo Bosetti and Matteo Ragni, University of Trento website: https://github.com/UniTN-Mechatronics/mruby-ftp protocol: git repository: https://github.com/UniTN-Mechatronics/mruby-ftp.git - repooptions: + repooptions: - name: mruby-gemcut description: runtime reconfigurer for mruby gems author: dearblue website: https://github.com/dearblue/mruby-gemcut protocol: git repository: https://github.com/dearblue/mruby-gemcut.git - repooptions: + repooptions: - name: mruby-geoip description: GeoIP(City) class using GeoIPCity.dat for mruby author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-geoip protocol: git repository: https://github.com/matsumotory/mruby-geoip.git - repooptions: + repooptions: - name: mruby-getloadavg description: Linux getloadavg(3) module author: takumakume website: https://github.com/takumakume/mruby-getloadavg protocol: git repository: https://github.com/takumakume/mruby-getloadavg.git - repooptions: + repooptions: - name: mruby-getoptlong description: An almost straight mruby port of Ruby's GetoptLong author: Sergio Rubio website: https://github.com/rubiojr/mruby-getoptlong protocol: git repository: https://github.com/rubiojr/mruby-getoptlong - repooptions: + repooptions: - name: mruby-getopts description: GNU getopt for mruby author: M&T Technology, Inc. website: https://github.com/mttech/mruby-getopts protocol: git repository: https://github.com/mttech/mruby-getopts - repooptions: + repooptions: - name: mruby-getpass description: Read passwords from the command prompt author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-getpass protocol: git repository: https://github.com/Asmod4n/mruby-getpass.git - repooptions: + repooptions: - name: mruby-gettimeofday description: A simple wrapper of `gettimeofday(2)` for mruby author: mame website: https://github.com/mame/mruby-gettimeofday protocol: git repository: https://github.com/mame/mruby-gettimeofday.git - repooptions: + repooptions: - name: mruby-girffi description: GObjectIntrospection bindings that dynamically bind GLib based libraries. ie, GLib,Gtk,WebKit ... @@ -620,98 +676,105 @@ website: https://github.com/ppibburr/mruby-girffi protocol: git repository: https://github.com/ppibburr/mruby-girffi.git - repooptions: + repooptions: - name: mruby-girffi-docgen description: Generates YARD documentation for bindings generated by mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-girffi-docgen protocol: git repository: https://github.com/ppibburr/mruby-girffi-docgen.git - repooptions: + repooptions: - name: mruby-gles description: OpenGL ES 2.0 binding author: xxuejie website: https://github.com/xxuejie/mruby-gles protocol: git repository: https://github.com/xxuejie/mruby-gles.git - repooptions: + repooptions: - name: mruby-glfw3 description: GLFW3 binding author: Takeshi Watanabe website: https://github.com/take-cheeze/mruby-glfw3 protocol: git repository: https://github.com/take-cheeze/mruby-glfw3.git - repooptions: + repooptions: - name: mruby-glib description: Cross platform standard library components à la GLib author: Jared Breeden website: https://github.com/jbreeden/mruby-glib protocol: git repository: https://github.com/jbreeden/mruby-glib.git - repooptions: + repooptions: - name: mruby-glib2 description: Bindings to GLib 2.x. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-glib2 protocol: git repository: https://github.com/ppibburr/mruby-glib2.git - repooptions: + repooptions: - name: mruby-gmp-bignum description: GMP-based Bignum implementation for mruby author: Ray Chason website: https://github.com/chasonr/mruby-gmp-bignum protocol: git repository: https://github.com/chasonr/mruby-gmp-bignum.git - repooptions: + repooptions: - name: mruby-gntp description: Growl Notification Transfer Protocol author: mattn website: https://github.com/mattn/mruby-gntp protocol: git repository: https://github.com/mattn/mruby-gntp.git - repooptions: + repooptions: - name: mruby-gobject description: Bindings to GObject. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-gobject protocol: git repository: https://github.com/ppibburr/mruby-gobject.git - repooptions: + repooptions: - name: mruby-gobject-introspection description: bindings to GObjectIntrospection (libgirepository) author: ppibburr website: https://github.com/ppibburr/mruby-gobject-introspection protocol: git repository: https://github.com/ppibburr/mruby-gobject-introspection.git - repooptions: + repooptions: +- name: mruby-gosu + description: mruby wrapper for the Gosu game library + author: cyberarm + website: https://github.com/cyberarm/mruby-gosu + protocol: git + repository: https://github.com/cyberarm/mruby-gosu.git + repooptions: - name: mruby-growthforecast description: GrowthForecast client class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-growthforecast protocol: git repository: https://github.com/matsumotory/mruby-growthforecast.git - repooptions: + repooptions: - name: mruby-gsl description: Wrapper to GNU Scientific Library (GSL). author: Paolo Bosetti, University of Trento website: https://github.com/UniTN-Mechatronics/mruby-gsl protocol: git repository: https://github.com/UniTN-Mechatronics/mruby-gsl.git - repooptions: + repooptions: - name: mruby-gtk2 description: Bindings to Gtk2. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-gtk2 protocol: git repository: https://github.com/ppibburr/mruby-gtk2.git - repooptions: + repooptions: - name: mruby-gtk3 description: Bindings to Gtk3. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-gtk3 protocol: git repository: https://github.com/ppibburr/mruby-gtk3.git - repooptions: + repooptions: - name: mruby-hashie description: Collection of classes and mixins that makes hashes more powerful author: @@ -721,14 +784,14 @@ website: https://github.com/k0kubun/mruby-hashie protocol: git repository: https://github.com/k0kubun/mruby-hashie.git - repooptions: + repooptions: - name: mruby-heeler description: Multi-process webserver author: Sebastian Katzer website: https://github.com/katzer/mruby-heeler protocol: git repository: https://github.com/katzer/mruby-heeler.git - repooptions: + repooptions: - name: mruby-hibari description: A Web application framework for Web servers that support mruby and Rack-based API @@ -736,133 +799,140 @@ website: https://github.com/kentaro/mruby-hibari protocol: git repository: https://github.com/kentaro/mruby-hibari.git - repooptions: + repooptions: - name: mruby-hiredis description: hiredis bindings for mruby. author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-hiredis protocol: git repository: https://github.com/Asmod4n/mruby-hiredis.git - repooptions: + repooptions: - name: mruby-hmac description: Digest::HMAC::hexdigest and Digest::HMAC::digest author: scalone website: https://github.com/scalone/mruby-hmac protocol: git repository: https://github.com/scalone/mruby-hmac.git - repooptions: + repooptions: - name: mruby-hogun description: convenient library to build the command line interface. author: qtakamitsu website: https://github.com/tk3/mruby-hogun protocol: git repository: https://github.com/tk3/mruby-hogun.git - repooptions: + repooptions: - name: mruby-host-stats description: library to gather stats on running system (cpu, memory, ...). author: Julien Ammous website: https://github.com/schmurfy/host-stats protocol: git repository: https://github.com/schmurfy/host-stats.git - repooptions: + repooptions: - name: mruby-hs-regexp description: Light-weight Henry Spencer's Regular Expression author: Masamitsu MURASE website: https://github.com/masamitsu-murase/mruby-hs-regexp protocol: git repository: https://github.com/masamitsu-murase/mruby-hs-regexp.git - repooptions: + repooptions: - name: mruby-http description: HTTP Parser author: mattn website: https://github.com/mattn/mruby-http protocol: git repository: https://github.com/mattn/mruby-http.git - repooptions: + repooptions: - name: mruby-http2 description: HTTP2 module for mruby author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-http2 protocol: git repository: https://github.com/matsumotory/mruby-http2.git - repooptions: + repooptions: - name: mruby-httprequest description: create http request class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-httprequest protocol: git repository: https://github.com/matsumotory/mruby-httprequest.git - repooptions: + repooptions: - name: mruby-httpsclient description: A simple https only Client author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-httpsclient protocol: git repository: https://github.com/Asmod4n/mruby-httpsclient.git - repooptions: + repooptions: - name: mruby-iconv description: libiconv interface author: mattn website: https://github.com/mattn/mruby-iconv protocol: git repository: https://github.com/mattn/mruby-iconv.git - repooptions: + repooptions: - name: mruby-iijson description: JSON parser and generator author: iij website: https://github.com/iij/mruby-iijson protocol: git repository: https://github.com/iij/mruby-iijson.git - repooptions: + repooptions: - name: mruby-implerr description: ImplementationError class author: Kouichi Nakanishi website: https://github.com/keizo042/mruby-implerr protocol: git repository: https://github.com/keizo042/mruby-implerr.git - repooptions: + repooptions: - name: mruby-inotify description: Inotify bindings author: FlavourSys Technology GmbH website: https://github.com/FlavourSys/mruby-inotify protocol: git repository: https://github.com/FlavourSys/mruby-inotify.git - repooptions: + repooptions: - name: mruby-io-console description: The implementation of io/console as CRuby. author: ksss website: https://github.com/ksss/mruby-io-console protocol: git repository: https://github.com/ksss/mruby-io-console.git - repooptions: + repooptions: - name: mruby-io-copy_stream description: IO.copy_stream method for mruby author: ksss website: https://github.com/ksss/mruby-io-copy_stream protocol: git repository: https://github.com/ksss/mruby-io-copy_stream.git - repooptions: + repooptions: +- name: mruby-io-uring + description: io-uring from linux for mruby + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-io_uring + protocol: git + repository: https://github.com/Asmod4n/mruby-io_uring.git + repooptions: - name: mruby-ionice description: Ionice class author: takumakume website: https://github.com/takumakume/mruby-ionice protocol: git repository: https://github.com/takumakume/mruby-ionice.git - repooptions: + repooptions: - name: mruby-ipaddr description: IPAddr class author: iij website: https://github.com/iij/mruby-ipaddr protocol: git repository: https://github.com/iij/mruby-ipaddr.git - repooptions: + repooptions: - name: mruby-ipfilter description: IPFilter class author: tap1ra website: https://github.com/pepabo/mruby-ipfilter protocol: git repository: https://github.com/pepabo/mruby-ipfilter.git - repooptions: + repooptions: - name: mruby-ipvs description: interface to IP Virtual Server (IPVS) for mruby author: YOSHIKAWA Ryota @@ -876,168 +946,175 @@ website: https://github.com/ppibburr/mruby-javascriptcore protocol: git repository: https://github.com/ppibburr/mruby-javascriptcore.git - repooptions: + repooptions: - name: mruby-jpeg description: JPeg library author: Carson McDonald website: https://github.com/carsonmcdonald/mruby-jpeg protocol: git repository: https://github.com/carsonmcdonald/mruby-jpeg.git - repooptions: + repooptions: - name: mruby-json description: JavaScript Object Notation author: mattn website: https://github.com/mattn/mruby-json protocol: git repository: https://github.com/mattn/mruby-json.git - repooptions: + repooptions: - name: mruby-jvm description: Utility for invoking the JVM author: jkutner website: https://github.com/jkutner/mruby-jvm protocol: git repository: https://github.com/jkutner/mruby-jvm.git - repooptions: + repooptions: - name: mruby-jwt description: A mruby implementation of JSON Web Token draft 06 author: Naoki AINOYA website: https://github.com/prevs-io/mruby-jwt protocol: git repository: https://github.com/prevs-io/mruby-jwt.git - repooptions: + repooptions: - name: mruby-k2hash description: mruby binding of yahoojapan/k2hash author: Ryo Okubo website: https://github.com/syucream/mruby-k2hash protocol: git repository: https://github.com/syucream/mruby-k2hash.git - repooptions: + repooptions: - name: mruby-kmp description: KMP searching algorithm in mruby author: santazhang website: https://github.com/santazhang/mruby-kmp protocol: git repository: https://github.com/santazhang/mruby-kmp.git - repooptions: + repooptions: - name: mruby-knn-detector description: Anomaly detector based on K-Nearest Neighbor author: tsurubee website: https://github.com/tsurubee/mruby-knn-detector protocol: git repository: https://github.com/tsurubee/mruby-knn-detector.git - repooptions: + repooptions: - name: mruby-leapmotion description: Providing wrapper classes for Leap Motion SDK. author: crimsonwoods website: https://github.com/crimsonwoods/mruby-leapmotion protocol: git repository: https://github.com/crimsonwoods/mruby-leapmotion.git - repooptions: + repooptions: - name: mruby-leveldb description: mruby LevelDB binding author: Takeshi Watanabe website: https://github.com/take-cheeze/mruby-leveldb protocol: git repository: https://github.com/take-cheeze/mruby-leveldb.git - repooptions: + repooptions: +- name: mruby-libdeflate + description: libdeflate for mruby + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-libdeflate + protocol: git + repository: https://github.com/Asmod4n/mruby-libdeflate.git + repooptions: - name: mruby-libhydrogen description: A lightweight, secure, easy-to-use crypto library for constrained environments. author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-libhydrogen protocol: git repository: https://github.com/Asmod4n/mruby-libhydrogen.git - repooptions: + repooptions: - name: mruby-libqrng description: libQRNG interface author: cremno website: https://github.com/cremno/mruby-libqrng protocol: git repository: https://github.com/cremno/mruby-libqrng.git - repooptions: + repooptions: - name: mruby-libsodium description: mruby wrapper for libsodium. author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-libsodium protocol: git repository: https://github.com/Asmod4n/mruby-libsodium.git - repooptions: + repooptions: - name: mruby-limits description: Const collection of limits.h author: ksss website: https://github.com/ksss/mruby-limits protocol: git repository: https://github.com/ksss/mruby-limits.git - repooptions: + repooptions: - name: mruby-linenoise description: linenoise for mruby, a line editing library akin to readline author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-linenoise protocol: git repository: https://github.com/Asmod4n/mruby-linenoise.git - repooptions: + repooptions: - name: mruby-linux-namespace description: A mgem to utilize linux namespaces author: Russel Hunter Yukawa / Uchio Kondo website: https://github.com/haconiwa/mruby-linux-namespace protocol: git repository: https://github.com/haconiwa/mruby-linux-namespace.git - repooptions: + repooptions: - name: mruby-lmdb description: mruby wrapper for Lightning Memory-Mapped Database from Symas. author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-lmdb protocol: git repository: https://github.com/Asmod4n/mruby-lmdb.git - repooptions: + repooptions: - name: mruby-localmemcache description: localmemcache binding author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-localmemcache protocol: git repository: https://github.com/matsumotory/mruby-localmemcache.git - repooptions: + repooptions: - name: mruby-logger description: A simple but sophisticated logging utility author: katzer website: https://github.com/katzer/mruby-logger protocol: git repository: https://github.com/katzer/mruby-logger.git - repooptions: + repooptions: - name: mruby-lruc description: Least Recently Used(LRU) cache using lruc author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-lruc protocol: git repository: https://github.com/matsumotory/mruby-lruc.git - repooptions: + repooptions: - name: mruby-lua description: Lua script engine author: Daisuke YAMAGUCHI website: https://github.com/dyama/mruby-lua protocol: git repository: https://github.com/dyama/mruby-lua.git - repooptions: + repooptions: - name: mruby-lz4 description: mruby bindings for lz4 author: dearblue website: https://github.com/dearblue/mruby-lz4 protocol: git repository: https://github.com/dearblue/mruby-lz4.git - repooptions: + repooptions: - name: mruby-lzma description: mruby bindings for lzma author: dearblue website: https://github.com/dearblue/mruby-lzma protocol: git repository: https://github.com/dearblue/mruby-lzma.git - repooptions: + repooptions: - name: mruby-m2x description: Client library for AT&T’s M2X API (fork) author: AT&T M2X Team website: https://github.com/attsdk/m2x-mruby protocol: git repository: https://github.com/attsdk/m2x-mruby.git - repooptions: + repooptions: - name: mruby-markdown description: Markdown library author: Carson McDonald @@ -1051,7 +1128,7 @@ website: https://github.com/take-cheeze/mruby-marshal protocol: git repository: https://github.com/take-cheeze/mruby-marshal.git - repooptions: + repooptions: - name: mruby-marshal-c description: Marshal module for mruby written in C-language with full object-link & symbol link support @@ -1059,70 +1136,70 @@ website: https://github.com/LanzaSchneider/mruby-marshal-c protocol: git repository: https://github.com/LanzaSchneider/mruby-marshal-c.git - repooptions: + repooptions: - name: mruby-marshal-fast description: Marshal module for mruby written in C, with speed advantages author: Carlo Prelz website: https://github.com/asfluido/mruby-marshal-fast protocol: git repository: https://github.com/asfluido/mruby-marshal-fast.git - repooptions: + repooptions: - name: mruby-matrix description: Matrix and vector library author: listrophy website: https://github.com/listrophy/mruby-matrix protocol: git repository: https://github.com/listrophy/mruby-matrix.git - repooptions: + repooptions: - name: mruby-maxminddb description: mruby [GeoIP2 MaxMind DB](https://maxmind.github.io/MaxMind-DB/) reader author: Kenichi Mitsugi website: https://github.com/happysiro/mruby-maxminddb protocol: git repository: https://github.com/happysiro/mruby-maxminddb - repooptions: + repooptions: - name: mruby-md5 description: MD5 Hash Algorithm author: mattn website: https://github.com/mattn/mruby-md5 protocol: git repository: https://github.com/mattn/mruby-md5.git - repooptions: + repooptions: - name: mruby-mecab description: Japanese morphological analyzer author: mattn website: https://github.com/mattn/mruby-mecab protocol: git repository: https://github.com/mattn/mruby-mecab.git - repooptions: + repooptions: - name: mruby-memcached description: libmemcached bindings by mruby author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-memcached protocol: git repository: https://github.com/matsumotory/mruby-memcached.git - repooptions: + repooptions: - name: mruby-merb description: ERB-like mruby gem author: pbosetti website: https://github.com/pbosetti/mruby-merb protocol: git repository: https://github.com/pbosetti/mruby-merb.git - repooptions: + repooptions: - name: mruby-method description: A implementation of class Method and UnboundMethod for mruby author: ksss website: https://github.com/ksss/mruby-method protocol: git repository: https://github.com/ksss/mruby-method.git - repooptions: + repooptions: - name: mruby-minigame description: 2D Game Framework for rapid prototyping author: bggd website: https://github.com/bggd/mruby-minigame protocol: git repository: https://github.com/bggd/mruby-minigame.git - repooptions: + repooptions: - name: mruby-miniz description: Ruby interface for Miniz v1.15, a zlib-subset to deflate/inflate and zip/unzip without dir support @@ -1130,84 +1207,84 @@ website: https://github.com/scalone/mruby-miniz protocol: git repository: https://github.com/scalone/mruby-miniz.git - repooptions: + repooptions: - name: mruby-mod-mruby-ext description: Extended Apache class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-mod-mruby-ext protocol: git repository: https://github.com/matsumotory/mruby-mod-mruby-ext.git - repooptions: + repooptions: - name: mruby-mrbgem-template description: Generate mrbgem template author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-mrbgem-template protocol: git repository: https://github.com/matsumotory/mruby-mrbgem-template.git - repooptions: + repooptions: - name: mruby-mrmagick description: ImageMagick binding for mruby. author: Junichi Kajiwara website: https://github.com/kjunichi/mruby-mrmagick protocol: git repository: https://github.com/kjunichi/mruby-mrmagick.git - repooptions: + repooptions: - name: mruby-msagent description: Microsoft Agent author: mattn website: https://github.com/mattn/mruby-msagent protocol: git repository: https://github.com/mattn/mruby-msagent.git - repooptions: + repooptions: - name: mruby-msd description: msd class author: pyama86 website: https://github.com/pepabo/mruby-msd protocol: git repository: https://github.com/pepabo/mruby-msd.git - repooptions: + repooptions: - name: mruby-msgpack description: MessagePack for mruby. author: Jun Hiroe website: https://github.com/suzukaze/mruby-msgpack protocol: git repository: https://github.com/suzukaze/mruby-msgpack.git - repooptions: + repooptions: - name: mruby-mtest description: Minimum Test Framework author: Internet Initiative Japan., Inc. website: https://github.com/iij/mruby-mtest protocol: git repository: https://github.com/iij/mruby-mtest.git - repooptions: + repooptions: - name: mruby-murmurhash1 description: Murmurhash1 digest author: ksss website: https://github.com/ksss/mruby-murmurhash1 protocol: git repository: https://github.com/ksss/mruby-murmurhash1.git - repooptions: + repooptions: - name: mruby-murmurhash2 description: Murmurhash2 digest author: ksss website: https://github.com/ksss/mruby-murmurhash2 protocol: git repository: https://github.com/ksss/mruby-murmurhash2.git - repooptions: + repooptions: - name: mruby-mutex description: Mutex class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-mutex protocol: git repository: https://github.com/matsumotory/mruby-mutex.git - repooptions: + repooptions: - name: mruby-mysql description: MySQL Database author: mattn website: https://github.com/mattn/mruby-mysql protocol: git repository: https://github.com/mattn/mruby-mysql.git - repooptions: + repooptions: - name: mruby-named-constants description: Allows dynamically defined constants of (Class|Module) to return the constant name when inspected @@ -1215,126 +1292,126 @@ website: https://github.com/ppibburr/mruby-named-constants protocol: git repository: https://github.com/ppibburr/mruby-named-constants.git - repooptions: + repooptions: - name: mruby-nanovg description: nanovg bindings author: Corey Powell website: https://github.com/IceDragon200/mruby-nanovg protocol: git repository: https://github.com/IceDragon200/mruby-nanovg - repooptions: + repooptions: - name: mruby-netlink description: libnetlink binding author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-netlink protocol: git repository: https://github.com/matsumotory/mruby-netlink.git - repooptions: + repooptions: - name: mruby-network-analyzer description: network statistics class author: pyama86 website: https://github.com/pyama86/mruby-network-analyzer protocol: git repository: https://github.com/pyama86/mruby-network-analyzer.git - repooptions: + repooptions: - name: mruby-ngx-mruby-ext description: Nginx ext class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-ngx-mruby-ext protocol: git repository: https://github.com/matsumotory/mruby-ngx-mruby-ext.git - repooptions: + repooptions: - name: mruby-oauth description: OAuth class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-oauth protocol: git repository: https://github.com/matsumotory/mruby-oauth.git - repooptions: + repooptions: - name: mruby-odbc description: unixODBC bindings author: qtakamitsu website: https://github.com/tk3/mruby-odbc protocol: git repository: https://github.com/tk3/mruby-odbc.git - repooptions: + repooptions: - name: mruby-onig-regexp description: Onigumo Regular Expression author: mattn website: https://github.com/mattn/mruby-onig-regexp protocol: git repository: https://github.com/mattn/mruby-onig-regexp.git - repooptions: + repooptions: - name: mruby-open3 description: Popen, but with stderr, too author: Takashi Kokubun website: https://github.com/k0kubun/mruby-open3 protocol: git repository: https://github.com/k0kubun/mruby-open3.git - repooptions: + repooptions: - name: mruby-optparse description: OptionParser ported to mruby author: fastly website: https://github.com/fastly/mruby-optparse protocol: git repository: https://github.com/fastly/mruby-optparse.git - repooptions: + repooptions: - name: mruby-opvault description: decrypt OPVault author: Seiei Miyagi website: https://github.com/hanachin/mruby-opvault protocol: git repository: https://github.com/hanachin/mruby-opvault.git - repooptions: + repooptions: - name: mruby-os description: Determine system and binary capabilities author: katzer website: https://github.com/katzer/mruby-os protocol: git repository: https://github.com/katzer/mruby-os.git - repooptions: + repooptions: - name: mruby-ostruct description: OpenStruct binding in mruby author: ksss website: https://github.com/ksss/mruby-ostruct protocol: git repository: https://github.com/ksss/mruby-ostruct.git - repooptions: + repooptions: - name: mruby-otp description: Generate and verify OTPs (HOTP and TOTP) author: Emanuele Vicentini website: https://github.com/baldowl/mruby-otp protocol: git repository: https://github.com/baldowl/mruby-otp.git - repooptions: + repooptions: - name: mruby-otpauth description: One time password class author: qtakamitsu website: https://github.com/tk3/mruby-otpauth protocol: git repository: https://github.com/tk3/mruby-otpauth.git - repooptions: + repooptions: - name: mruby-oui description: Duangle OUI bindings. author: Corey Powell website: https://github.com/IceDragon200/mruby-oui protocol: git repository: https://github.com/IceDragon200/mruby-oui - repooptions: + repooptions: - name: mruby-passwdqc description: A Password quality checker author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-passwdqc protocol: git repository: https://github.com/Asmod4n/mruby-passwdqc - repooptions: + repooptions: - name: mruby-pcre-regexp description: PCRE - Perl Compatible Regular Expressions author: mattn website: https://github.com/mattn/mruby-pcre-regexp protocol: git repository: https://github.com/mattn/mruby-pcre-regexp.git - repooptions: + repooptions: - name: mruby-perlin-noise description: Perlin noise generator for mruby author: @@ -1344,63 +1421,63 @@ website: https://github.com/dabroz/mruby-perlin-noise protocol: git repository: https://github.com/dabroz/mruby-perlin-noise.git - repooptions: + repooptions: - name: mruby-phr description: mruby bindings for picohttpparser author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-phr protocol: git repository: https://github.com/Asmod4n/mruby-phr.git - repooptions: + repooptions: - name: mruby-pid description: A PID algorithm library based on Temper author: Andrew Nordman website: https://github.com/cadwallion/mruby-pid protocol: git repository: https://github.com/cadwallion/mruby-pid.git - repooptions: + repooptions: - name: mruby-ping description: ping hosts using ICMP or ARP packets. author: Julien Ammous website: https://github.com/schmurfy/mruby-ping protocol: git repository: https://github.com/schmurfy/mruby-ping - repooptions: + repooptions: - name: mruby-pjson description: JSON Parser written in pure mruby author: mattn website: https://github.com/mattn/mruby-pjson protocol: git repository: https://github.com/mattn/mruby-pjson.git - repooptions: + repooptions: - name: mruby-pkcs5 description: Provide PKCS5 functionality with mruby-digest author: Seiei Miyagi website: https://github.com/hanachin/mruby-pkcs5 protocol: git repository: https://github.com/hanachin/mruby-pkcs5.git - repooptions: + repooptions: - name: mruby-plplot description: PLPlot mruby interface author: Paolo Bosetti website: https://github.com/pbosetti/mruby-plplot protocol: git repository: https://github.com/pbosetti/mruby-plplot.git - repooptions: + repooptions: - name: mruby-polarssl description: SSL and cryptography functionality from PolarSSL in your mruby programs author: luisbebop website: https://github.com/luisbebop/mruby-polarssl protocol: git repository: https://github.com/luisbebop/mruby-polarssl.git - repooptions: + repooptions: - name: mruby-poll description: Low level system poll for mruby author: Asmod4n website: https://github.com/Asmod4n/mruby-poll protocol: git repository: https://github.com/Asmod4n/mruby-poll.git - repooptions: + repooptions: - name: mruby-pong description: mruby-pong is a simple library for quickly creating web applications in mruby @@ -1408,49 +1485,49 @@ website: https://nsheremet.github.io/mruby-pong protocol: git repository: https://github.com/nsheremet/mruby-pong.git - repooptions: + repooptions: - name: mruby-posix-regexp description: mruby's Regexp class implementation using libc's posix-based regexp author: Uchio Kondo website: https://github.com/udzura/mruby-posix-regexp protocol: git repository: https://github.com/udzura/mruby-posix-regexp.git - repooptions: + repooptions: - name: mruby-posix_ipc description: A mgem for access to POSIX IPC API author: Uchio Kondo website: https://github.com/udzura/mruby-posix_ipc protocol: git repository: https://github.com/udzura/mruby-posix_ipc.git - repooptions: + repooptions: - name: mruby-postgresql description: Postgresql adapter for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-postgresql protocol: git repository: https://github.com/Asmod4n/mruby-postgresql.git - repooptions: + repooptions: - name: mruby-proc-irep-ext description: irep extensions for Proc class author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-proc-irep-ext protocol: git repository: https://github.com/Asmod4n/mruby-proc-irep-ext.git - repooptions: + repooptions: - name: mruby-process description: Process interface (waitpid, pid, kill, fork, ppid) author: Internet Initiative Japan., Inc. website: https://github.com/iij/mruby-process protocol: git repository: https://github.com/iij/mruby-process.git - repooptions: + repooptions: - name: mruby-process2 description: Implementation of the Ruby 2.4.1 Core Library Process for mruby. author: katzer website: https://github.com/katzer/mruby-process protocol: git repository: https://github.com/katzer/mruby-process.git - repooptions: + repooptions: - name: mruby-publicsuffix description: mruby port of publicsuffix-ruby. PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains. @@ -1458,28 +1535,28 @@ website: https://github.com/hfm/mruby-publicsuffix protocol: git repository: https://github.com/hfm/mruby-publicsuffix.git - repooptions: + repooptions: - name: mruby-pure-regexp description: Pure mruby Regexp (third-party fork) author: h2so5 website: https://github.com/WindProphet/mruby-pure-regexp protocol: git repository: https://github.com/WindProphet/mruby-pure-regexp.git - repooptions: + repooptions: - name: mruby-qml-parse description: QML Parser for mruby author: fundamental website: https://github.com/mruby-zest/mruby-qml-parse protocol: git repository: https://github.com/mruby-zest/mruby-qml-parse - repooptions: + repooptions: - name: mruby-qml-spawn description: Optimized Ruby flavored qml->pure Ruby pseudo-compiler author: fundamental website: https://github.com/mruby-zest/mruby-qml-spawn protocol: git repository: https://github.com/mruby-zest/mruby-qml-spawn - repooptions: + repooptions: - name: mruby-qrcode description: Ruby interface to QR Code C Library by Ryusuke SEKIYAMA author: @@ -1488,105 +1565,105 @@ website: https://github.com/scalone/mruby-qrcode protocol: git repository: https://github.com/scalone/mruby-qrcode.git - repooptions: + repooptions: - name: mruby-r3 description: mruby binding for libr3 (path dispatching library) author: katzer website: https://github.com/katzer/mruby-r3 protocol: git repository: https://github.com/katzer/mruby-r3.git - repooptions: + repooptions: - name: mruby-rake description: rake for mruby author: ksss website: https://github.com/ksss/mruby-rake protocol: git repository: https://github.com/ksss/mruby-rake.git - repooptions: + repooptions: - name: mruby-rakie description: An event driven network toolkit with Fiber author: Jakit Liang website: https://github.com/jakitliang/mruby-rakie protocol: git repository: https://github.com/jakitliang/mruby-rakie.git - repooptions: + repooptions: - name: mruby-random description: random class with Mersenne Twister author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-random protocol: git repository: https://github.com/matsumotory/mruby-random.git - repooptions: + repooptions: - name: mruby-raspberry description: Wrapper for WiringPi library for accessing Raspberry Pi hardware. author: Paolo Bosetti, University of Trento website: https://github.com/UniTN-Mechatronics/mruby-raspberry protocol: git repository: https://github.com/UniTN-Mechatronics/mruby-raspberry.git - repooptions: + repooptions: - name: mruby-rcon description: resource management mrbgem using cgroup author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-rcon protocol: git repository: https://github.com/matsumotory/mruby-rcon.git - repooptions: + repooptions: - name: mruby-redis description: redis client using hiredis author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-redis protocol: git repository: https://github.com/matsumotory/mruby-redis.git - repooptions: + repooptions: - name: mruby-redis-ae description: mruby wrapper for the Redis Ae event loop. author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-redis-ae protocol: git repository: https://github.com/Asmod4n/mruby-redis-ae.git - repooptions: + repooptions: - name: mruby-redis-cluster description: Client library for Redis Cluster based on matsumotory/mruby-redis author: Yuki Kirii website: https://github.com/yukirii/mruby-redis-cluster protocol: git repository: https://github.com/yukirii/mruby-redis-cluster.git - repooptions: + repooptions: - name: mruby-regexp-pcre description: regular expression module utilizing PCRE library author: iij website: https://github.com/iij/mruby-regexp-pcre protocol: git repository: https://github.com/iij/mruby-regexp-pcre.git - repooptions: + repooptions: - name: mruby-renice description: getpriority(2)/setpriority(2) for mruby, it like renice(1) author: takumakume website: https://github.com/takumakume/mruby-renice protocol: git repository: https://github.com/takumakume/mruby-renice.git - repooptions: + repooptions: - name: mruby-require description: require implementation author: mattn website: https://github.com/mattn/mruby-require protocol: git repository: https://github.com/mattn/mruby-require.git - repooptions: + repooptions: - name: mruby-research description: research for mruby author: ksss website: https://github.com/ksss/mruby-research protocol: git repository: https://github.com/ksss/mruby-research.git - repooptions: + repooptions: - name: mruby-resource description: resource binding author: harasou website: https://github.com/harasou/mruby-resource protocol: git repository: https://github.com/harasou/mruby-resource.git - repooptions: + repooptions: - name: mruby-ripemd description: Ruby interface to C RIPEMD-160 hash-function by Antoon Bosselaers author: @@ -1595,98 +1672,98 @@ website: https://github.com/scalone/mruby-ripemd protocol: git repository: https://github.com/scalone/mruby-ripemd.git - repooptions: + repooptions: - name: mruby-romajify description: Japanese romanization library for mruby author: emsk website: https://github.com/emsk/mruby-romajify protocol: git repository: https://github.com/emsk/mruby-romajify.git - repooptions: + repooptions: - name: mruby-rubyffi-compat description: rubyffi compatibility layer on top of mruby-cfunc. author: Julien Ammous, ppibburr website: https://github.com/schmurfy/mruby-rubyffi-compat protocol: git repository: https://github.com/schmurfy/mruby-rubyffi-compat.git - repooptions: + repooptions: - name: mruby-seccomp description: libseccomp wrapper for mruby author: Uchio Kondo website: https://github.com/haconiwa/mruby-seccomp protocol: git repository: https://github.com/haconiwa/mruby-seccomp.git - repooptions: + repooptions: - name: mruby-secure-compare description: Secure String comparisons for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-secure-compare protocol: git repository: https://github.com/Asmod4n/mruby-secure-compare.git - repooptions: + repooptions: - name: mruby-secure-random description: SecureRandom class author: monochromegane website: https://github.com/monochromegane/mruby-secure-random protocol: git repository: https://github.com/monochromegane/mruby-secure-random.git - repooptions: + repooptions: - name: mruby-serialport description: Serialport support author: Monami-ya LLC, Japan website: https://github.com/monami-ya-mrb/mruby-serialport/ protocol: git repository: https://github.com/monami-ya-mrb/mruby-serialport.git - repooptions: + repooptions: - name: mruby-set description: Set class author: yui-knk website: https://github.com/yui-knk/mruby-set protocol: git repository: https://github.com/yui-knk/mruby-set.git - repooptions: + repooptions: - name: mruby-sftp description: Simple SFTP client for mruby author: katzer website: https://github.com/katzer/mruby-sftp protocol: git repository: https://github.com/katzer/mruby-sftp.git - repooptions: + repooptions: - name: mruby-sftp-glob description: SFTP::Dir#glob extension for mruby-sftp author: katzer website: https://github.com/katzer/mruby-sftp-glob protocol: git repository: https://github.com/katzer/mruby-sftp-glob.git - repooptions: + repooptions: - name: mruby-sha1 description: SHA1 Hash Algorithm author: mattn website: https://github.com/mattn/mruby-sha1 protocol: git repository: https://github.com/mattn/mruby-sha1.git - repooptions: + repooptions: - name: mruby-sha2 description: SHA2 Hash Algorithm (third-party fork) author: h2so5 website: https://github.com/scalone/mruby-sha2 protocol: git repository: https://github.com/scalone/mruby-sha2.git - repooptions: + repooptions: - name: mruby-shelf description: modular webserver interface inspired by rack author: katzer website: https://github.com/katzer/mruby-shelf protocol: git repository: https://github.com/katzer/mruby-shelf.git - repooptions: + repooptions: - name: mruby-shelf-deflater description: Enables compression of http responses author: katzer website: https://github.com/katzer/mruby-shelf-deflater protocol: git repository: https://github.com/katzer/mruby-shelf-deflater.git - repooptions: + repooptions: - name: mruby-shellwords description: Manipulates strings like the UNIX Bourne shell author: @@ -1696,105 +1773,105 @@ website: https://github.com/k0kubun/mruby-shellwords protocol: git repository: https://github.com/k0kubun/mruby-shellwords.git - repooptions: + repooptions: - name: mruby-sidekiq-client description: SidekiqClient class author: monochromegane website: https://github.com/monochromegane/mruby-sidekiq-client protocol: git repository: https://github.com/monochromegane/mruby-sidekiq-client.git - repooptions: + repooptions: - name: mruby-signal description: Signal trap and callback in mruby author: ksss website: https://github.com/ksss/mruby-signal protocol: git repository: https://github.com/ksss/mruby-signal.git - repooptions: + repooptions: - name: mruby-signal-thread description: Multi thread Signal trap and callback in mruby author: pyama86 website: https://github.com/pyama86/mruby-signal-thread protocol: git repository: https://github.com/pyama86/mruby-signal-thread.git - repooptions: + repooptions: - name: mruby-simple-random description: Kernel#rand and Kernel#srand author: Internet Initiative Japan., Inc. website: https://github.com/iij/mruby-simple-random protocol: git repository: https://github.com/iij/mruby-simple-random.git - repooptions: + repooptions: - name: mruby-simplehttp description: Simple http client author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-simplehttp protocol: git repository: https://github.com/matsumotory/mruby-simplehttp.git - repooptions: + repooptions: - name: mruby-simplehttp-socket description: Simple http client using mruby-socket author: Kentaro Yoshida, Internet Initiative Japan Inc. website: https://github.com/y-ken/mruby-simplehttp-socket protocol: git repository: https://github.com/y-ken/mruby-simplehttp-socket.git - repooptions: + repooptions: - name: mruby-simplehttpserver description: SimpleHttpServer class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-simplehttpserver protocol: git repository: https://github.com/matsumotory/mruby-simplehttpserver.git - repooptions: + repooptions: - name: mruby-simplemsgpack description: A simple mruby wrapper for msgpack author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-simplemsgpack protocol: git repository: https://github.com/Asmod4n/mruby-simplemsgpack.git - repooptions: + repooptions: - name: mruby-simpletest description: SimpleTest class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-simpletest protocol: git repository: https://github.com/matsumotory/mruby-simpletest.git - repooptions: + repooptions: - name: mruby-sinatic description: Sinatra like Web Framework author: mattn website: https://github.com/mattn/mruby-sinatic protocol: git repository: https://github.com/mattn/mruby-sinatic.git - repooptions: + repooptions: - name: mruby-singleton description: Singleton module in mruby author: ksss website: https://github.com/ksss/mruby-singleton protocol: git repository: https://github.com/ksss/mruby-singleton.git - repooptions: + repooptions: - name: mruby-siphash description: Message digest by SipHash author: ksss website: https://github.com/ksss/mruby-siphash protocol: git repository: https://github.com/ksss/mruby-siphash.git - repooptions: + repooptions: - name: mruby-smallhttp description: Small http-client gem for mruby author: Nazarii Sheremet website: https://github.com/nsheremet/mruby-smallhttp protocol: git repository: https://github.com/nsheremet/mruby-smallhttp.git - repooptions: + repooptions: - name: mruby-spdy description: SPDY module for mruby author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-spdy protocol: git repository: https://github.com/matsumotory/mruby-spdy.git - repooptions: + repooptions: - name: mruby-specinfra description: Common layer for serverspec and itamae author: @@ -1803,7 +1880,7 @@ website: https://github.com/k0kubun/mruby-specinfra protocol: git repository: https://github.com/k0kubun/mruby-specinfra.git - repooptions: + repooptions: - name: mruby-sqlite description: "(Another) SQLite3 mrbgem, aiming for compatibility with MRI's sqlite3 gem." @@ -1811,217 +1888,239 @@ website: https://github.com/jbreeden/mruby-sqlite protocol: git repository: https://github.com/jbreeden/mruby-sqlite.git - repooptions: + repooptions: - name: mruby-sqlite3 description: SQLite3 Database author: mattn website: https://github.com/mattn/mruby-sqlite3 protocol: git repository: https://github.com/mattn/mruby-sqlite3.git - repooptions: + repooptions: - name: mruby-ssh description: Simple SSH client for mruby author: katzer website: https://github.com/katzer/mruby-ssh protocol: git repository: https://github.com/katzer/mruby-ssh.git - repooptions: -- name: mruby-statemachine - description: a tiny state machine for mruby - author: Hendrik Beskow - website: https://github.com/ascaridol/mruby-statemachine - protocol: git - repository: https://github.com/ascaridol/mruby-statemachine.git - repooptions: + repooptions: - name: mruby-string-crypt description: implementation of String#crypt author: mattn website: https://github.com/mattn/mruby-string-crypt protocol: git repository: https://github.com/mattn/mruby-string-crypt.git - repooptions: + repooptions: - name: mruby-string-ext-latin9 description: Conversion from iso-8859-15 (Latin9) to UTF-8 author: katzer website: https://github.com/katzer/mruby-string-ext-latin9 protocol: git repository: https://github.com/katzer/mruby-string-ext-latin9.git - repooptions: + repooptions: - name: mruby-string-is-utf8 description: checks if a string is valid utf8 author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-string-is-utf8 protocol: git repository: https://github.com/Asmod4n/mruby-string-is-utf8.git - repooptions: + repooptions: - name: mruby-string-xor description: XOR two strings author: Seiei Miyagi website: https://github.com/hanachin/mruby-string-xor protocol: git repository: https://github.com/hanachin/mruby-string-xor.git - repooptions: + repooptions: - name: mruby-stringio description: StringIO class author: ksss website: https://github.com/ksss/mruby-stringio protocol: git repository: https://github.com/ksss/mruby-stringio.git - repooptions: + repooptions: - name: mruby-strptime description: Strptime in mruby author: naritta website: https://github.com/naritta/mruby-strptime protocol: git repository: https://github.com/naritta/mruby-strptime.git - repooptions: + repooptions: - name: mruby-sysconf description: Sysconf class author: pyama86 website: https://github.com/pyama86/mruby-sysconf protocol: git repository: https://github.com/pyama86/mruby-sysconf.git - repooptions: + repooptions: - name: mruby-syslog description: Syslog binding author: iij website: https://github.com/iij/mruby-syslog protocol: git repository: https://github.com/iij/mruby-syslog.git - repooptions: + repooptions: - name: mruby-sysrandom description: Secure random number generation for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-sysrandom protocol: git repository: https://github.com/Asmod4n/mruby-sysrandom.git - repooptions: + repooptions: - name: mruby-tbot description: mruby wrapper for Telegram's Bot API author: Nazarii Sheremet website: https://github.com/nsheremet/mruby-tbot protocol: git repository: https://github.com/nsheremet/mruby-tbot.git - repooptions: + repooptions: - name: mruby-tempfile description: Tempfile class author: iij website: https://github.com/iij/mruby-tempfile protocol: git repository: https://github.com/iij/mruby-tempfile.git - repooptions: + repooptions: +- name: mruby-termbox2 + description: Low-level bindings to Termbox2 + author: Paweł Świątkowski + website: https://github.com/katafrakt/mruby-termbox2 + protocol: git + repository: https://github.com/katafrakt/mruby-termbox2.git + repooptions: - name: mruby-terminal-table description: A fast and simple, yet feature rich ASCII table generator author: katzer website: https://github.com/katzer/mruby-terminal-table protocol: git repository: https://github.com/katzer/mruby-terminal-table.git - repooptions: + repooptions: - name: mruby-thread description: Thread Library author: mattn website: https://github.com/mattn/mruby-thread protocol: git repository: https://github.com/mattn/mruby-thread.git - repooptions: + repooptions: +- name: mruby-time-httpdate + description: mruby-time-httpdate provides a method to format Time objects as HTTP + date strings. + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-time-httpdate + protocol: git + repository: https://github.com/Asmod4n/mruby-time-httpdate.git + repooptions: - name: mruby-time-strftime description: Time#strftime for mruby author: monochromegane website: https://github.com/monochromegane/mruby-time-strftime protocol: git repository: https://github.com/monochromegane/mruby-time-strftime.git - repooptions: + repooptions: - name: mruby-timer-thread description: Timer Thread class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-timer-thread protocol: git repository: https://github.com/matsumotory/mruby-timer-thread.git - repooptions: + repooptions: - name: mruby-tiny-io description: Tiny IO library for mruby author: mimaki website: https://github.com/mimaki/mruby-tiny-io protocol: git repository: https://github.com/mimaki/mruby-tiny-io.git - repooptions: + repooptions: - name: mruby-tiny-opt-parser description: Command-line option analysis for mruby author: katzer website: https://github.com/katzer/mruby-tiny-opt-parser protocol: git repository: https://github.com/katzer/mruby-tiny-opt-parser.git - repooptions: + repooptions: - name: mruby-tinymt description: random module using TinyMT author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-tinymt protocol: git repository: https://github.com/matsumotory/mruby-tinymt.git - repooptions: + repooptions: - name: mruby-tinyxml2 description: mruby bindings for TinyXML-2 (third-party fork) author: h2so5 website: https://github.com/scalone/mruby-tinyxml2 protocol: git repository: https://github.com/scalone/mruby-tinyxml2.git - repooptions: + repooptions: - name: mruby-tls description: mruby bindings for libtls from libressl author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-tls protocol: git repository: https://github.com/Asmod4n/mruby-tls.git - repooptions: + repooptions: +- name: mruby-toml + description: a TOML mgem for mruby + author: Hendrik Beskow + website: https://github.com/Asmod4n/mruby-toml + protocol: git + repository: https://github.com/Asmod4n/mruby-toml.git + repooptions: - name: mruby-tty-screen description: Detects terminal screen size author: Piotr Murach, Jeremy Jung website: https://github.com/jeremyjung/mruby-tty-screen protocol: git repository: https://github.com/jeremyjung/mruby-tty-screen.git - repooptions: + repooptions: - name: mruby-uchardet description: mruby binding of Mozilla's universal charset detector. author: Takeshi Watanabe website: https://github.com/take-cheeze/mruby-uchardet/ protocol: git repository: https://github.com/take-cheeze/mruby-uchardet.git - repooptions: + repooptions: - name: mruby-uname description: Uname class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-uname protocol: git repository: https://github.com/matsumotory/mruby-uname.git - repooptions: + repooptions: - name: mruby-unbound description: mruby client for Unbound (libunbound) author: Kouichi Nakanishi website: https://github.com/keizo042/mruby-unbound protocol: git repository: https://github.com/keizo042/mruby-unbound.git - repooptions: + repooptions: - name: mruby-unicode-display_width description: Monospace Unicode character width author: katzer website: https://github.com/katzer/mruby-unicode-display_width protocol: git repository: https://github.com/katzer/mruby-unicode-display_width.git - repooptions: + repooptions: - name: mruby-updategems description: Rake task to update GEMs author: mattn website: https://github.com/mattn/mruby-updategems protocol: git repository: https://github.com/mattn/mruby-updategems.git - repooptions: + repooptions: - name: mruby-uri-parser description: URI parser for mruby author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-uri-parser protocol: git repository: https://github.com/Asmod4n/mruby-uri-parser.git - repooptions: + repooptions: +- name: mruby-uriparser + description: URI parser for mruby. + author: gemmaro + website: https://github.com/gemmaro/mruby-uriparser + protocol: git + repository: https://github.com/gemmaro/mruby-uriparser + repooptions: - name: mruby-userdata description: When shared mrb_state, you can share userdata objects between one Ruby code and the other. @@ -2029,137 +2128,137 @@ website: https://github.com/matsumotory/mruby-userdata protocol: git repository: https://github.com/matsumotory/mruby-userdata.git - repooptions: + repooptions: - name: mruby-uv description: libuv interface author: mattn website: https://github.com/mattn/mruby-uv protocol: git repository: https://github.com/mattn/mruby-uv.git - repooptions: + repooptions: - name: mruby-v8 description: V8 JavaScript Engine author: mattn website: https://github.com/mattn/mruby-v8 protocol: git repository: https://github.com/mattn/mruby-v8.git - repooptions: + repooptions: - name: mruby-vedis description: vedis binding author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-vedis protocol: git repository: https://github.com/matsumotory/mruby-vedis.git - repooptions: + repooptions: - name: mruby-virtualing description: creating jail environment, limiting resource and separating filesystem author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-virtualing protocol: git repository: https://github.com/matsumotory/mruby-virtualing.git - repooptions: + repooptions: - name: mruby-weakref description: weakref implementation for mruby author: dearblue website: https://github.com/dearblue/mruby-weakref protocol: git repository: https://github.com/dearblue/mruby-weakref.git - repooptions: + repooptions: - name: mruby-webkit-1 description: Bindings to WebKitGTK-1.x. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-webkit-1 protocol: git repository: https://github.com/ppibburr/mruby-webkit-1.git - repooptions: + repooptions: - name: mruby-webkit-3 description: Bindings to WebKitGTK-3.x. uses mruby-girffi author: ppibburr website: https://github.com/ppibburr/mruby-webkit-3 protocol: git repository: https://github.com/ppibburr/mruby-webkit-3.git - repooptions: + repooptions: - name: mruby-win32ole description: A port of CRuby's WIN32OLE to mruby. author: Takashi Sawanaka website: https://github.com/sdottaka/mruby-win32ole protocol: git repository: https://github.com/sdottaka/mruby-win32ole.git - repooptions: + repooptions: - name: mruby-winapp description: Create non-console application for windows author: mattn website: https://github.com/mattn/mruby-winapp protocol: git repository: https://github.com/mattn/mruby-winapp.git - repooptions: + repooptions: - name: mruby-WiringPi description: Binding for Wiring function of the Raspberry Pi author: Akira Yumiyama website: https://github.com/akiray03/mruby-WiringPi protocol: git repository: https://github.com/akiray03/mruby-WiringPi.git - repooptions: + repooptions: - name: mruby-wslay description: mruby wrapper for wslay author: Hendrik Beskow website: https://github.com/Asmod4n/mruby-wslay protocol: git repository: https://github.com/Asmod4n/mruby-wslay - repooptions: + repooptions: - name: mruby-yaml description: YAML parser and emitter author: Andrew Belt website: https://github.com/mrbgems/mruby-yaml protocol: git repository: https://github.com/mrbgems/mruby-yaml.git - repooptions: + repooptions: - name: mruby-yeah description: mruby on tiny rails author: katzer website: https://github.com/katzer/mruby-yeah protocol: git repository: https://github.com/katzer/mruby-yeah.git - repooptions: + repooptions: - name: mruby-zabbix description: zabbix 2.0 API client class author: MATSUMOTO Ryosuke website: https://github.com/matsumotory/mruby-zabbix protocol: git repository: https://github.com/matsumotory/mruby-zabbix.git - repooptions: + repooptions: - name: mruby-zest description: Widget classes for the mruby-zest framework author: fundamental website: https://github.com/mruby-zest/mruby-zest protocol: git repository: https://github.com/mruby-zest/mruby-zest - repooptions: + repooptions: - name: mruby-zlib description: ZLib bindings for mruby author: Jared Breeden website: https://github.com/jbreeden/mruby-zlib protocol: git repository: https://github.com/jbreeden/mruby-zlib.git - repooptions: + repooptions: - name: mruby-zmq description: mruby bindings for libzmq4 author: Hendrik Beskow website: https://github.com/zeromq/mruby-zmq protocol: git repository: https://github.com/zeromq/mruby-zmq.git - repooptions: + repooptions: - name: mruby-zstd description: mruby bindings for zstd author: dearblue website: https://github.com/dearblue/mruby-zstd protocol: git repository: https://github.com/dearblue/mruby-zstd.git - repooptions: -- name: mruby-zyre - description: Zyre - an open-source framework for proximity-based peer-to-peer applications + repooptions: +- name: typedargs + description: A tiny operator‑typed CLI language for structured data. author: Hendrik Beskow - website: https://github.com/Asmod4n/mruby-zyre + website: https://github.com/Asmod4n/typedargs protocol: git - repository: https://github.com/Asmod4n/mruby-zyre.git - repooptions: + repository: https://github.com/Asmod4n/typedargs.git + repooptions: diff --git a/docs/api/.nojekyll b/docs/api/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/api/Addrinfo.html b/docs/api/Addrinfo.html deleted file mode 100644 index c1b3f7a..0000000 --- a/docs/api/Addrinfo.html +++ /dev/null @@ -1,1566 +0,0 @@ - - - - - - - Class: Addrinfo - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Addrinfo - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #protocol ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute protocol.

      -
      - -
    • - - -
    • - - - #socktype ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute socktype.

      -
      - -
    • - - -
    - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(sockaddr, family = Socket::PF_UNSPEC, socktype = 0, protocol = 0) ⇒ Addrinfo - - - - - -

    -
    - -

    Returns a new instance of Addrinfo.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 2
    -
    -def initialize(sockaddr, family=Socket::PF_UNSPEC, socktype=0, protocol=0)
    -  @hostname = nil
    -  if sockaddr.is_a? Array
    -    sary = sockaddr
    -    if sary[0] == 'AF_INET' || sary[0] == 'AF_INET6'
    -      @sockaddr = Socket.sockaddr_in(sary[1], sary[3])
    -      @hostname = sary[2]
    -    elsif sary[0] == 'AF_UNIX'
    -      @sockaddr = Socket.sockaddr_un(sary[1])
    -    end
    -  else
    -    @sockaddr = sockaddr.dup
    -  end
    -  if family == Socket::PF_UNSPEC or family == nil
    -    @family = Socket._sockaddr_family(@sockaddr)
    -  else
    -    @family = family
    -  end
    -  @socktype = socktype
    -  @protocol = protocol
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #protocolObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute protocol.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -136
    -137
    -138
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 136
    -
    -def protocol
    -  @protocol
    -end
    -
    -
    - - - -
    -

    - - #socktypeObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute socktype.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -137
    -138
    -139
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 137
    -
    -def socktype
    -  @socktype
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .foreach(nodename, service, family = nil, socktype = nil, protocol = nil, flags = 0, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -24
    -25
    -26
    -27
    -28
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 24
    -
    -def self.foreach(nodename, service, family=nil, socktype=nil, protocol=nil, flags=0, &block)
    -  a = self.getaddrinfo(nodename, service, family, socktype, protocol, flags)
    -  a.each { |ai| block.call(ai) }
    -  a
    -end
    -
    -
    - -
    -

    - - .ip(host) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -30
    -31
    -32
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 30
    -
    -def self.ip(host)
    -  Addrinfo.new(Socket.sockaddr_in(0, host))
    -end
    -
    -
    - -
    -

    - - .tcp(host, port) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -34
    -35
    -36
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 34
    -
    -def self.tcp(host, port)
    -  Addrinfo.getaddrinfo(host, port, nil, Socket::SOCK_STREAM, Socket::IPPROTO_TCP)[0]
    -end
    -
    -
    - -
    -

    - - .udp(host, port) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -38
    -39
    -40
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 38
    -
    -def self.udp(host, port)
    -  Addrinfo.getaddrinfo(host, port, nil, Socket::SOCK_DGRAM, Socket::IPPROTO_UDP)[0]
    -end
    -
    -
    - -
    -

    - - .unix(path, socktype = Socket::SOCK_STREAM) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -42
    -43
    -44
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 42
    -
    -def self.unix(path, socktype=Socket::SOCK_STREAM)
    -  Addrinfo.new(Socket.sockaddr_un(path), Socket::AF_UNIX, socktype)
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #_to_arrayObject - - - - - -

    - - - - -
    -
    -
    -
    -139
    -140
    -141
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 139
    -
    -def _to_array
    -  case @family
    -  when Socket::AF_INET
    -    s = "AF_INET"
    -  when Socket::AF_INET6
    -    s = "AF_INET6"
    -  when Socket::AF_UNIX
    -    s = "AF_UNIX"
    -  else
    -    s = "(unknown AF)"
    -  end
    -  addr, port = self.getnameinfo(Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV)
    -  [ s, port.to_i, addr, addr ]
    -end
    -
    -
    - -
    -

    - - #afamilyObject - - - - - -

    - - - - -
    -
    -
    -
    -46
    -47
    -48
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 46
    -
    -def afamily
    -  @family
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    -
    - -

    def family_addrinfo(host, port=nil) def getnameinfo(flags=0) Socket.getnameinfo end

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 61
    -
    -def inspect
    -  if ipv4? or ipv6?
    -    if @protocol == Socket::IPPROTO_TCP or (@socktype == Socket::SOCK_STREAM and @protocol == 0)
    -      proto = 'TCP'
    -    elsif @protocol == Socket::IPPROTO_UDP or (@socktype == Socket::SOCK_DGRAM and @protocol == 0)
    -      proto = 'UDP'
    -    else
    -      proto = '???'
    -    end
    -  else
    -    proto = "SOCK_STREAM"
    -  end
    -  "#<Addrinfo: #{inspect_sockaddr} #{proto}>"
    -end
    -
    -
    - -
    -

    - - #inspect_sockaddrObject - - - - - -

    - - - - -
    -
    -
    -
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 76
    -
    -def inspect_sockaddr
    -  if ipv4?
    -    a, p = ip_unpack
    -    "#{a}:#{p}"
    -  elsif ipv6?
    -    a, p = ip_unpack
    -    "[#{a}]:#{p}"
    -  elsif unix?
    -    unix_path
    -  else
    -    '???'
    -  end
    -end
    -
    -
    - -
    -

    - - #ip?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -90
    -91
    -92
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 90
    -
    -def ip?
    -  ipv4? or ipv6?
    -end
    -
    -
    - -
    -

    - - #ip_addressObject - - - - - -

    - - - - -
    -
    -
    -
    -94
    -95
    -96
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 94
    -
    -def ip_address
    -  ip_unpack[0]
    -end
    -
    -
    - -
    -

    - - #ip_portObject - - - - - -

    - - - - -
    -
    -
    -
    -98
    -99
    -100
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 98
    -
    -def ip_port
    -  ip_unpack[1]
    -end
    -
    -
    - -
    -

    - - #ip_unpackObject - - - - - -

    - - - - -
    -
    -
    -
    -102
    -103
    -104
    -105
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 102
    -
    -def ip_unpack
    -  h, p = getnameinfo(Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV)
    -  [ h, p.to_i ]
    -end
    -
    -
    - -
    -

    - - #ipv4?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -107
    -108
    -109
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 107
    -
    -def ipv4?
    -  @family == Socket::AF_INET
    -end
    -
    -
    - -
    -

    - - #ipv6?Boolean - - - - - -

    -
    - -

    def ipv4_loopback? def ipv4_multicast? def ipv4_private?

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -115
    -116
    -117
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 115
    -
    -def ipv6?
    -  @family == Socket::AF_INET6
    -end
    -
    -
    - -
    -

    - - #pfamilyObject - - - - - -

    -
    - -

    def ipv6_loopback? def ipv6_mc_global? def ipv6_mc_linklocal? def ipv6_mc_nodelocal? def ipv6_mc_orilocal? def ipv6_mc_sitelocal? def ipv6_multicast? def ipv6_to_ipv4 def ipv6_unspecified def ipv6_v4compat? def ipv6_v4mapped? def listen(backlog=5)

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -132
    -133
    -134
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 132
    -
    -def pfamily
    -  @family
    -end
    -
    -
    - -
    -

    - - #to_sockaddrObject - - - - Also known as: - to_s - - - - -

    - - - - -
    -
    -
    -
    -154
    -155
    -156
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 154
    -
    -def to_sockaddr
    -  @sockaddr
    -end
    -
    -
    - -
    -

    - - #unix?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -160
    -161
    -162
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 160
    -
    -def unix?
    -  @family == Socket::AF_UNIX
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/ArgumentError.html b/docs/api/ArgumentError.html deleted file mode 100644 index 96f3fd2..0000000 --- a/docs/api/ArgumentError.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - Exception: ArgumentError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: ArgumentError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.24

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    UncaughtThrowError

    -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Array.html b/docs/api/Array.html deleted file mode 100644 index 4bf989e..0000000 --- a/docs/api/Array.html +++ /dev/null @@ -1,3981 +0,0 @@ - - - - - - - Class: Array - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Array - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/array.rb,
    - mrbgems/mruby-enum-ext/mrblib/enum.rb,
    mrbgems/mruby-array-ext/mrblib/array.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Array

    - -

    ISO 15.2.12

    - - -
    -
    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #sum, #take, #take_while, #tally, #zip

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #&(elem) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary & other_ary -> new_ary

    - -

    Set Intersection—Returns a new array containing elements common to the two arrays, with no duplicates.

    - -

    [ 1, 1, 3, 5 ] & [ 1, 2, 3 ] #=> [ 1, 3 ]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -173
    -174
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 152
    -
    -def &(elem)
    -  raise TypeError, "cannot convert #{elem.class} into Array" unless elem.class == Array
    -
    -  hash = {}
    -  array = []
    -  idx = 0
    -  len = elem.size
    -  while idx < len
    -    hash[elem[idx]] = true
    -    idx += 1
    -  end
    -  idx = 0
    -  len = size
    -  while idx < len
    -    v = self[idx]
    -    if hash[v]
    -      array << v
    -      hash.delete v
    -    end
    -    idx += 1
    -  end
    -  array
    -end
    -
    -
    - -
    -

    - - #-(elem) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary - other_ary -> new_ary

    - -

    Array Difference—Returns a new array that is a copy of the original array, removing any items that also appear in other_ary. (If you need set-like behavior, see the library class Set.)

    - -

    [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    -89
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 70
    -
    -def -(elem)
    -  raise TypeError, "can't convert #{elem.class} into Array" unless elem.class == Array
    -
    -  hash = {}
    -  array = []
    -  idx = 0
    -  len = elem.size
    -  while idx < len
    -    hash[elem[idx]] = true
    -    idx += 1
    -  end
    -  idx = 0
    -  len = size
    -  while idx < len
    -    v = self[idx]
    -    array << v unless hash[v]
    -    idx += 1
    -  end
    -  array
    -end
    -
    -
    - -
    -

    - - #__repeated_combination(n, permutation, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -970
    -971
    -972
    -973
    -974
    -975
    -976
    -977
    -978
    -979
    -980
    -981
    -982
    -983
    -984
    -985
    -986
    -987
    -988
    -989
    -990
    -991
    -992
    -993
    -994
    -995
    -996
    -997
    -998
    -999
    -1000
    -1001
    -1002
    -1003
    -1004
    -1005
    -1006
    -1007
    -1008
    -1009
    -1010
    -1011
    -1012
    -1013
    -1014
    -1015
    -1016
    -1017
    -1018
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 970
    -
    -def __repeated_combination(n, permutation, &block)
    -  n = n.__to_int
    -  case n
    -  when 0
    -    yield []
    -  when 1
    -    i = 0
    -    while i < self.size
    -      yield [self[i]]
    -      i += 1
    -    end
    -  else
    -    if n > 0
    -      v = [0] * n
    -      while true
    -        tmp = [nil] * n
    -        i = 0
    -        while i < n
    -          tmp[i] = self[v[i]]
    -          i += 1
    -        end
    -
    -        yield tmp
    -
    -        tmp = self.size
    -        i = n - 1
    -        while i >= 0
    -          v[i] += 1
    -          break if v[i] < tmp
    -          i -= 1
    -        end
    -        break unless v[0] < tmp
    -        i = 1
    -        while i < n
    -          unless v[i] < tmp
    -            if permutation
    -              v[i] = 0
    -            else
    -              v[i] = v[i - 1]
    -            end
    -          end
    -          i += 1
    -        end
    -      end
    -    end
    -  end
    -
    -  self
    -end
    -
    -
    - -
    -

    - - #bsearch(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.bsearch {|x| block } -> elem

    - -

    By using binary search, finds a value from this array which meets the given condition in O(log n) where n is the size of the array.

    - -

    You can use this method in two use cases: a find-minimum mode and a find-any mode. In either case, the elements of the array must be monotone (or sorted) with respect to the block.

    - -

    In find-minimum mode (this is a good choice for typical use case), the block must return true or false, and there must be an index i (0 <= i <= ary.size) so that:

    -
    • -

      the block returns false for any element whose index is less than i, and

      -
    • -

      the block returns true for any element whose index is greater than or equal to i.

      -
    - -

    This method returns the i-th element. If i is equal to ary.size, it returns nil.

    - -
    ary = [0, 4, 7, 10, 12]
    -ary.bsearch {|x| x >=   4 } #=> 4
    -ary.bsearch {|x| x >=   6 } #=> 7
    -ary.bsearch {|x| x >=  -1 } #=> 0
    -ary.bsearch {|x| x >= 100 } #=> nil
    -
    - -

    In find-any mode (this behaves like libc’s bsearch(3)), the block must return a number, and there must be two indices i and j (0 <= i <= j <= ary.size) so that:

    -
    • -

      the block returns a positive number for ary if 0 <= k < i,

      -
    • -

      the block returns zero for ary if i <= k < j, and

      -
    • -

      the block returns a negative number for ary if j <= k < ary.size.

      -
    - -

    Under this condition, this method returns any element whose index is within i…j. If i is equal to j (i.e., there is no element that satisfies the block), this method returns nil.

    - -
    ary = [0, 4, 7, 10, 12]
    -# try to find v such that 4 <= v < 8
    -ary.bsearch {|x| 1 - (x / 4).truncate } #=> 4 or 7
    -# try to find v such that 8 <= v < 10
    -ary.bsearch {|x| 4 - (x / 2).truncate } #=> nil
    -
    - -

    You must not mix the two modes at a time; the block must always return either true/false, or always return a number. It is undefined which value is actually picked up at each iteration.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -586
    -587
    -588
    -589
    -590
    -591
    -592
    -593
    -594
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 586
    -
    -def bsearch(&block)
    -  return to_enum :bsearch unless block
    -
    -  if idx = bsearch_index(&block)
    -    self[idx]
    -  else
    -    nil
    -  end
    -end
    -
    -
    - -
    -

    - - #bsearch_index(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.bsearch_index {|x| block } -> int or nil

    - -

    By using binary search, finds an index of a value from this array which meets the given condition in O(log n) where n is the size of the array.

    - -

    It supports two modes, depending on the nature of the block and they are exactly the same as in the case of #bsearch method with the only difference being that this method returns the index of the element instead of the element itself. For more details consult the documentation for #bsearch.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -608
    -609
    -610
    -611
    -612
    -613
    -614
    -615
    -616
    -617
    -618
    -619
    -620
    -621
    -622
    -623
    -624
    -625
    -626
    -627
    -628
    -629
    -630
    -631
    -632
    -633
    -634
    -635
    -636
    -637
    -638
    -639
    -640
    -641
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 608
    -
    -def bsearch_index(&block)
    -  return to_enum :bsearch_index unless block
    -
    -  low = 0
    -  high = size
    -  satisfied = false
    -
    -  while low < high
    -    mid = ((low+high)/2).truncate
    -    res = block.call self[mid]
    -
    -    case res
    -    when 0 # find-any mode: Found!
    -      return mid
    -    when Numeric # find-any mode: Continue...
    -      in_lower_half = res < 0
    -    when true # find-min mode
    -      in_lower_half = true
    -      satisfied = true
    -    when false, nil # find-min mode
    -      in_lower_half = false
    -    else
    -      raise TypeError, 'invalid block result (must be numeric, true, false or nil)'
    -    end
    -
    -    if in_lower_half
    -      high = mid
    -    else
    -      low = mid + 1
    -    end
    -  end
    -
    -  satisfied ? low : nil
    -end
    -
    -
    - -
    -

    - - #collect!(&block) ⇒ Object - - - - Also known as: - map! - - - - -

    -
    - -

    call-seq: array.collect! {|element| … } -> self array.collect! -> new_enumerator

    - -

    Calls the given block for each element of self and pass the respective element. Each element will be replaced by the resulting values.

    - -

    ISO 15.2.12.5.7

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -
    -
    # File 'mrblib/array.rb', line 56
    -
    -def collect!(&block)
    -  return to_enum :collect! unless block
    -
    -  idx = 0
    -  len = size
    -  while idx < len
    -    self[idx] = block.call(self[idx])
    -    idx += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #combination(n, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.combination(n) { |c| block } -> ary ary.combination(n) -> Enumerator

    - -

    When invoked with a block, yields all combinations of length n of elements from the array and then returns the array itself.

    - -

    The implementation makes no guarantees about the order in which the combinations are yielded.

    - -

    If no block is given, an Enumerator is returned instead.

    - -

    Examples:

    - -

    a = [1, 2, 3, 4] a.combination(1).to_a #=> [[1],,[3],] a.combination(2).to_a #=> [[1,2],,[1,4],,[2,4],] a.combination(3).to_a #=> [[1,2,3],,[1,3,4],] a.combination(4).to_a #=> [[1,2,3,4]] a.combination(0).to_a #=> [[]] # one combination of length 0 a.combination(5).to_a #=> [] # no combinations of length 5

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -795
    -796
    -797
    -798
    -799
    -800
    -801
    -802
    -803
    -804
    -805
    -806
    -807
    -808
    -809
    -810
    -811
    -812
    -813
    -814
    -815
    -816
    -817
    -818
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 795
    -
    -def combination(n, &block)
    -  n = n.__to_int
    -  return to_enum(:combination, n) unless block
    -  size = self.size
    -  if n == 0
    -    yield []
    -  elsif n == 1
    -    i = 0
    -    while i<size
    -      yield [self[i]]
    -      i += 1
    -    end
    -  elsif n <= size
    -    i = 0
    -    while i<size
    -      result = [self[i]]
    -      self[i+1..-1].combination(n-1) do |c|
    -        yield result + c
    -      end
    -      i += 1
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #delete_if(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.delete_if { |item| block } -> ary ary.delete_if -> Enumerator

    - -

    Deletes every element of self for which block evaluates to true.

    - -

    The array is changed instantly every time the block is called, not after the iteration is over.

    - -

    See also Array#reject!

    - -

    If no block is given, an Enumerator is returned instead.

    - -
    scores = [ 97, 42, 75 ]
    -scores.delete_if {|score| score < 80 }   #=> [97]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -467
    -468
    -469
    -470
    -471
    -472
    -473
    -474
    -475
    -476
    -477
    -478
    -479
    -480
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 467
    -
    -def delete_if(&block)
    -  return to_enum :delete_if unless block
    -
    -  result = []
    -  idx = 0
    -  len = size
    -  while idx < len
    -    elem = self[idx]
    -    result << elem unless block.call(elem)
    -    idx += 1
    -  end
    -
    -  self.replace(result)
    -end
    -
    -
    - -
    -

    - - #difference(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.difference(other_ary1, other_ary2, …) -> new_ary

    - -

    Returns a new array that is a copy of the original array, removing all occurrences of any item that also appear in other_ary. The order is preserved from the original array.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -99
    -100
    -101
    -102
    -103
    -104
    -105
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 99
    -
    -def difference(*args)
    -  ary = self
    -  args.each do |x|
    -    ary = ary - x
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #dig(idx, *args) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.dig(idx, …) -> object

    - -

    Extracts the nested value specified by the sequence of idx objects by calling dig at each step, returning nil if any intermediate step is nil.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -712
    -713
    -714
    -715
    -716
    -717
    -718
    -719
    -720
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 712
    -
    -def dig(idx,*args)
    -  idx = idx.__to_int
    -  n = self[idx]
    -  if args.size > 0
    -    n&.dig(*args)
    -  else
    -    n
    -  end
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: array.each {|element| … } -> self array.each -> Enumerator

    - -

    Calls the given block for each element of self and pass the respective element.

    - -

    ISO 15.2.12.5.10

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -
    -
    # File 'mrblib/array.rb', line 15
    -
    -def each(&block)
    -  return to_enum :each unless block
    -
    -  idx = 0
    -  while idx < length
    -    block.call(self[idx])
    -    idx += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_index(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: array.each_index {|index| … } -> self array.each_index -> Enumerator

    - -

    Calls the given block for each element of self and pass the index of the respective element.

    - -

    ISO 15.2.12.5.11

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -
    -
    # File 'mrblib/array.rb', line 35
    -
    -def each_index(&block)
    -  return to_enum :each_index unless block
    -
    -  idx = 0
    -  while idx < length
    -    block.call(idx)
    -    idx += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #fetch(n, ifnone = NONE, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.fetch(index) -> obj ary.fetch(index, default) -> obj ary.fetch(index) { |index| block } -> obj

    - -

    Tries to return the element at position index, but throws an IndexError exception if the referenced index lies outside of the array bounds. This error can be prevented by supplying a second argument, which will act as a default value.

    - -

    Alternatively, if a block is given it will only be executed when an invalid index is referenced.

    - -

    Negative values of index count from the end of the array.

    - -
    a = [ 11, 22, 33, 44 ]
    -a.fetch(1)               #=> 22
    -a.fetch(-1)              #=> 44
    -a.fetch(4, 'cat')        #=> "cat"
    -a.fetch(100) { |i| puts "#{i} is out of bounds" }
    -                         #=> "100 is out of bounds"
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -333
    -334
    -335
    -336
    -337
    -338
    -339
    -340
    -341
    -342
    -343
    -344
    -345
    -346
    -347
    -348
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 333
    -
    -def fetch(n, ifnone=NONE, &block)
    -  #warn "block supersedes default value argument" if !n.nil? && ifnone != NONE && block
    -
    -  idx = n.__to_int
    -  if idx < 0
    -    idx += size
    -  end
    -  if idx < 0 || size <= idx
    -    return block.call(n) if block
    -    if NONE.equal?(ifnone)
    -      raise IndexError, "index #{n} outside of array bounds: #{-size}...#{size}"
    -    end
    -    return ifnone
    -  end
    -  self[idx]
    -end
    -
    -
    - -
    -

    - - #fetch_values(*idx, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.fetch_values(idx, …) -> array ary.fetch_values(idx, …) { |i| block } -> array

    - -

    Returns an array containing the values associated with the given indexes. but also raises IndexError when one of indexes can’t be found. Also see Array#values_at and Array#fetch.

    - -

    a = [“cat”, “dog”, “cow”]

    - -

    a.fetch_values(2, 0) #=> [“cow”, “cat”] a.fetch_values(2, 5) # raises KeyError a.fetch_values(2, 5) {|i| “BIRD” } #=> [“cow”, “BIRD”]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -892
    -893
    -894
    -895
    -896
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 892
    -
    -def fetch_values(*idx, &block)
    -  idx.map do |i|
    -    self.fetch(i, &block)
    -  end
    -end
    -
    -
    - -
    -

    - - #fill(arg0 = nil, arg1 = nil, arg2 = nil, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.fill(obj) -> ary ary.fill(obj, start [, length]) -> ary ary.fill(obj, range ) -> ary ary.fill { |index| block } -> ary ary.fill(start [, length] ) { |index| block } -> ary ary.fill(range) { |index| block } -> ary

    - -

    The first three forms set the selected elements of self (which may be the entire array) to obj.

    - -

    A start of nil is equivalent to zero.

    - -

    A length of nil is equivalent to the length of the array.

    - -

    The last three forms fill the array with the value of the given block, which is passed the absolute index of each element to be filled.

    - -

    Negative values of start count from the end of the array, where -1 is the last element.

    - -
    a = [ "a", "b", "c", "d" ]
    -a.fill("x")              #=> ["x", "x", "x", "x"]
    -a.fill("w", -1)          #=> ["x", "x", "x", "w"]
    -a.fill("z", 2, 2)        #=> ["x", "x", "z", "z"]
    -a.fill("y", 0..1)        #=> ["y", "y", "z", "z"]
    -a.fill { |i| i*i }       #=> [0, 1, 4, 9]
    -a.fill(-2) { |i| i*i*i } #=> [0, 1, 8, 27]
    -a.fill(1, 2) { |i| i+1 } #=> [0, 2, 3, 27]
    -a.fill(0..1) { |i| i+1 } #=> [1, 2, 3, 27]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -383
    -384
    -385
    -386
    -387
    -388
    -389
    -390
    -391
    -392
    -393
    -394
    -395
    -396
    -397
    -398
    -399
    -400
    -401
    -402
    -403
    -404
    -405
    -406
    -407
    -408
    -409
    -410
    -411
    -412
    -413
    -414
    -415
    -416
    -417
    -418
    -419
    -420
    -421
    -422
    -423
    -424
    -425
    -426
    -427
    -428
    -429
    -430
    -431
    -432
    -433
    -434
    -435
    -436
    -437
    -438
    -439
    -440
    -441
    -442
    -443
    -444
    -445
    -446
    -447
    -448
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 383
    -
    -def fill(arg0=nil, arg1=nil, arg2=nil, &block)
    -  if arg0.nil? && arg1.nil? && arg2.nil? && !block
    -    raise ArgumentError, "wrong number of arguments (given 0, expected 1..3)"
    -  end
    -
    -  beg = len = 0
    -  if block
    -    if arg0.nil? && arg1.nil? && arg2.nil?
    -      # ary.fill { |index| block }                    -> ary
    -      beg = 0
    -      len = self.size
    -    elsif !arg0.nil? && arg0.kind_of?(Range)
    -      # ary.fill(range) { |index| block }             -> ary
    -      beg = arg0.begin
    -      beg += self.size if beg < 0
    -      len = arg0.end
    -      len += self.size if len < 0
    -      len += 1 unless arg0.exclude_end?
    -    elsif !arg0.nil?
    -      # ary.fill(start [, length] ) { |index| block } -> ary
    -      beg = arg0.__to_int
    -      beg += self.size if beg < 0
    -      if arg1.nil?
    -        len = self.size
    -      else
    -        len = beg + arg1.__to_int
    -      end
    -    end
    -  else
    -    if !arg0.nil? && arg1.nil? && arg2.nil?
    -      # ary.fill(obj)                                 -> ary
    -      beg = 0
    -      len = self.size
    -    elsif !arg0.nil? && !arg1.nil? && arg1.kind_of?(Range)
    -      # ary.fill(obj, range )                         -> ary
    -      beg = arg1.begin
    -      beg += self.size if beg < 0
    -      len = arg1.end
    -      len += self.size if len < 0
    -      len += 1 unless arg1.exclude_end?
    -    elsif !arg0.nil? && !arg1.nil?
    -      # ary.fill(obj, start [, length])               -> ary
    -      beg = arg1.__to_int
    -      beg += self.size if beg < 0
    -      if arg2.nil?
    -        len = self.size
    -      else
    -        len = beg + arg2.__to_int
    -      end
    -    end
    -  end
    -
    -  i = beg
    -  if block
    -    while i < len
    -      self[i] = block.call(i)
    -      i += 1
    -    end
    -  else
    -    while i < len
    -      self[i] = arg0
    -      i += 1
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #flatten(depth = nil) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.flatten -> new_ary ary.flatten(level) -> new_ary

    - -

    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 level argument determines the level of recursion to flatten.

    - -

    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] a = [ 1, 2, [3, [4, 5] ] ] a.flatten(1) #=> [1, 2, 3, [4, 5]]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -252
    -253
    -254
    -255
    -256
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 252
    -
    -def flatten(depth=nil)
    -  res = Array.new(self)
    -  res.flatten! depth
    -  res
    -end
    -
    -
    - -
    -

    - - #flatten!(depth = nil) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.flatten! -> ary or nil ary.flatten!(level) -> array or nil

    - -

    Flattens self in place. Returns nil if no modifications were made (i.e., ary contains no subarrays.) If the optional level argument determines the level of recursion to flatten.

    - -

    a = [ 1, 2, [3, [4, 5] ] ] a.flatten! #=> [1, 2, 3, 4, 5] a.flatten! #=> nil a #=> [1, 2, 3, 4, 5] a = [ 1, 2, [3, [4, 5] ] ] a.flatten!(1) #=> [1, 2, 3, [4, 5]]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -275
    -276
    -277
    -278
    -279
    -280
    -281
    -282
    -283
    -284
    -285
    -286
    -287
    -288
    -289
    -290
    -291
    -292
    -293
    -294
    -295
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 275
    -
    -def flatten!(depth=nil)
    -  modified = false
    -  ar = []
    -  idx = 0
    -  len = size
    -  while idx < len
    -    e = self[idx]
    -    if e.is_a?(Array) && (depth.nil? || depth > 0)
    -      ar += e.flatten(depth.nil? ? nil : depth - 1)
    -      modified = true
    -    else
    -      ar << e
    -    end
    -    idx += 1
    -  end
    -  if modified
    -    self.replace(ar)
    -  else
    -    nil
    -  end
    -end
    -
    -
    - -
    -

    - - #insert(idx, *args) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.insert(index, obj…) -> ary

    - -

    Inserts the given values before the element with the given index.

    - -

    Negative indices count backwards from the end of the array, where -1 is the last element.

    - -
    a = %w{ a b c d }
    -a.insert(2, 99)         #=> ["a", "b", 99, "c", "d"]
    -a.insert(-2, 1, 2, 3)   #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -527
    -528
    -529
    -530
    -531
    -532
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 527
    -
    -def insert(idx, *args)
    -  idx = idx.__to_int
    -  idx += self.size + 1 if idx < 0
    -  self[idx, 0] = args
    -  self
    -end
    -
    -
    - -
    -

    - - #intersect?(ary) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: ary.intersect?(other_ary) -> true or false

    - -

    Returns true if the array and other_ary have at least one element in common, otherwise returns false.

    - -

    a = [ 1, 2, 3 ] b = [ 3, 4, 5 ] c = [ 5, 6, 7 ] a.intersect?(b) #=> true a.intersect?© #=> false

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -206
    -207
    -208
    -209
    -210
    -211
    -212
    -213
    -214
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
    -223
    -224
    -225
    -226
    -227
    -228
    -229
    -230
    -231
    -232
    -233
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 206
    -
    -def intersect?(ary)
    -  raise TypeError, "cannot convert #{ary.class} into Array" unless ary.class == Array
    -
    -  hash = {}
    -  if self.length > ary.length
    -    shorter = ary
    -    longer = self
    -  else
    -    shorter = self
    -    longer = ary
    -  end
    -  idx = 0
    -  len = shorter.size
    -  while idx < len
    -    hash[shorter[idx]] = true
    -    idx += 1
    -  end
    -  idx = 0
    -  len = size
    -  while idx < len
    -    v = longer[idx]
    -    if hash[v]
    -      return true
    -    end
    -    idx += 1
    -  end
    -  false
    -end
    -
    -
    - -
    -

    - - #intersection(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.intersection(other_ary,…) -> new_ary

    - -

    Set Intersection—Returns a new array containing elements common to this array and other_arys, removing duplicates. The order is preserved from the original array.

    - -

    [1, 2, 3].intersection([3, 4, 1], [1, 3, 5]) #=> [1, 3]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 186
    -
    -def intersection(*args)
    -  ary = self
    -  args.each do |x|
    -    ary = ary & x
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #keep_if(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.keep_if { |item| block } -> ary ary.keep_if -> Enumerator

    - -

    Deletes every element of self for which the given block evaluates to false.

    - -

    See also Array#select!

    - -

    If no block is given, an Enumerator is returned instead.

    - -
    a = [1, 2, 3, 4, 5]
    -a.keep_if { |val| val > 3 } #=> [4, 5]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -658
    -659
    -660
    -661
    -662
    -663
    -664
    -665
    -666
    -667
    -668
    -669
    -670
    -671
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 658
    -
    -def keep_if(&block)
    -  return to_enum :keep_if unless block
    -
    -  result = []
    -  idx = 0
    -  len = size
    -  while idx < len
    -    elem = self[idx]
    -    result << elem if block.call(elem)
    -    idx += 1
    -  end
    -
    -  self.replace(result)
    -end
    -
    -
    - -
    -

    - - #permutation(n = self.size, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.permutation { |p| block } -> ary ary.permutation -> Enumerator ary.permutation(n) { |p| block } -> ary ary.permutation(n) -> Enumerator

    - -

    When invoked with a block, yield all permutations of length n of the elements of the array, then return the array itself.

    - -

    If n is not specified, yield all permutations of all elements.

    - -

    The implementation makes no guarantees about the order in which the permutations are yielded.

    - -

    If no block is given, an Enumerator is returned instead.

    - -

    Examples:

    - -

    a = [1, 2, 3] a.permutation.to_a #=> [[1,2,3],,[2,1,3],,[3,1,2],] a.permutation(1).to_a #=> [[1],,[3]] a.permutation(2).to_a #=> [[1,2],,[2,1],,[3,1],] a.permutation(3).to_a #=> [[1,2,3],,[2,1,3],,[3,1,2],] a.permutation(0).to_a #=> [[]] # one permutation of length 0 a.permutation(4).to_a #=> [] # no permutations of length 4

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -748
    -749
    -750
    -751
    -752
    -753
    -754
    -755
    -756
    -757
    -758
    -759
    -760
    -761
    -762
    -763
    -764
    -765
    -766
    -767
    -768
    -769
    -770
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 748
    -
    -def permutation(n=self.size, &block)
    -  n = n.__to_int
    -  return to_enum(:permutation, n) unless block
    -  size = self.size
    -  if n == 0
    -    yield []
    -  elsif 0 < n && n <= size
    -    i = 0
    -    while i<size
    -      result = [self[i]]
    -      if n-1 > 0
    -        ary = self[0...i] + self[i+1..-1]
    -        ary.permutation(n-1) do |c|
    -          yield result + c
    -        end
    -      else
    -        yield result
    -      end
    -      i += 1
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #product(*arys, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.product(arys) -> array ary.product(arys) { |item| … } -> self

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -902
    -903
    -904
    -905
    -906
    -907
    -908
    -909
    -910
    -911
    -912
    -913
    -914
    -915
    -916
    -917
    -918
    -919
    -920
    -921
    -922
    -923
    -924
    -925
    -926
    -927
    -928
    -929
    -930
    -931
    -932
    -933
    -934
    -935
    -936
    -937
    -938
    -939
    -940
    -941
    -942
    -943
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 902
    -
    -def product(*arys, &block)
    -  size = arys.size
    -  i = size
    -  while i > 0
    -    i -= 1
    -    unless arys[i].kind_of?(Array)
    -      raise TypeError, "no implicit conversion into Array"
    -    end
    -  end
    -
    -  i = size
    -  total = self.size
    -  total *= arys[i -= 1].size while i > 0
    -
    -  if block
    -    result = self
    -    list = ->(*, e) { block.call e }
    -    class << list; alias []= call; end
    -  else
    -    result = [nil] * total
    -    list = result
    -  end
    -
    -  i = 0
    -  while i < total
    -    group = [nil] * (size + 1)
    -    j = size
    -    n = i
    -    while j > 0
    -      j -= 1
    -      a = arys[j]
    -      b = a.size
    -      group[j + 1] = a[n % b]
    -      n /= b
    -    end
    -    group[0] = self[n]
    -    list[i] = group
    -    i += 1
    -  end
    -
    -  result
    -end
    -
    -
    - -
    -

    - - #reject!(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.reject! { |item| block } -> ary or nil ary.reject! -> Enumerator

    - -

    Equivalent to Array#delete_if, deleting elements from self for which the block evaluates to true, but returns nil if no changes were made.

    - -

    The array is changed instantly every time the block is called, not after the iteration is over.

    - -

    See also Enumerable#reject and Array#delete_if.

    - -

    If no block is given, an Enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -497
    -498
    -499
    -500
    -501
    -502
    -503
    -504
    -505
    -506
    -507
    -508
    -509
    -510
    -511
    -512
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 497
    -
    -def reject!(&block)
    -  return to_enum :reject! unless block
    -
    -  result = []
    -  idx = 0
    -  len = size
    -  while idx < len
    -    elem = self[idx]
    -    result << elem unless block.call(elem)
    -    idx += 1
    -  end
    -
    -  return nil if len == result.size
    -
    -  self.replace(result)
    -end
    -
    -
    - -
    -

    - - #repeated_combination(n, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.repeated_combination(n) { |combination| … } -> self ary.repeated_combination(n) -> enumerator

    - -

    A combination method that contains the same elements.

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -951
    -952
    -953
    -954
    -955
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 951
    -
    -def repeated_combination(n, &block)
    -  raise TypeError, "no implicit conversion into Integer" unless 0 <=> n
    -  return to_enum(:repeated_combination, n) unless block
    -  __repeated_combination(n, false, &block)
    -end
    -
    -
    - -
    -

    - - #repeated_permutation(n, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.repeated_permutation(n) { |permutation| … } -> self ary.repeated_permutation(n) -> enumerator

    - -

    A permutation method that contains the same elements.

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -963
    -964
    -965
    -966
    -967
    -968
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 963
    -
    -def repeated_permutation(n, &block)
    -  n = n.__to_int
    -  raise TypeError, "no implicit conversion into Integer" unless 0 <=> n
    -  return to_enum(:repeated_permutation, n) unless block
    -  __repeated_combination(n, true, &block)
    -end
    -
    -
    - -
    -

    - - #reverse_each(&block) ⇒ Object - - - - - -

    -
    - -

    for efficiency

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -298
    -299
    -300
    -301
    -302
    -303
    -304
    -305
    -306
    -307
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 298
    -
    -def reverse_each(&block)
    -  return to_enum :reverse_each unless block
    -
    -  i = self.size - 1
    -  while i>=0
    -    block.call(self[i])
    -    i -= 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #select!(&block) ⇒ Object - - - - Also known as: - filter! - - - - -

    -
    - -

    call-seq: ary.select! {|item| block } -> ary or nil ary.select! -> Enumerator

    - -

    Invokes the given block passing in successive elements from self, deleting elements for which the block returns a false value.

    - -

    If changes were made, it will return self, otherwise it returns nil.

    - -

    See also Array#keep_if

    - -

    If no block is given, an Enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -687
    -688
    -689
    -690
    -691
    -692
    -693
    -694
    -695
    -696
    -697
    -698
    -699
    -700
    -701
    -702
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 687
    -
    -def select!(&block)
    -  return to_enum :select! unless block
    -
    -  result = []
    -  idx = 0
    -  len = size
    -  while idx < len
    -    elem = self[idx]
    -    result << elem if block.call(elem)
    -    idx += 1
    -  end
    -
    -  return nil if len == result.size
    -
    -  self.replace(result)
    -end
    -
    -
    - -
    -

    - - #sort(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: array.sort -> new_array array.sort {|a, b| … } -> new_array

    - -

    Returns a new Array whose elements are those from self, sorted.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -84
    -85
    -86
    -
    -
    # File 'mrblib/array.rb', line 84
    -
    -def sort(&block)
    -  self.dup.sort!(&block)
    -end
    -
    -
    - -
    -

    - - #sort_by(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -921
    -922
    -923
    -924
    -925
    -926
    -927
    -928
    -929
    -930
    -931
    -932
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 921
    -
    -def sort_by(&block)
    -  return to_enum :sort_by unless block
    -
    -  ary = []
    -  self.each_with_index{|e, i|
    -    ary.push([block.call(e), i])
    -  }
    -  if ary.size > 1
    -    ary.sort!
    -  end
    -  ary.collect!{|e,i| self[i]}
    -end
    -
    -
    - -
    -

    - - #sort_by!(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -934
    -935
    -936
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 934
    -
    -def sort_by!(&block)
    -  self.replace(self.sort_by(&block))
    -end
    -
    -
    - -
    -

    - - #to_aObject - - - - Also known as: - entries - - - - -

    -
    - -

    call-seq: array.to_a -> self

    - -

    Returns self, no need to convert.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -93
    -94
    -95
    -
    -
    # File 'mrblib/array.rb', line 93
    -
    -def to_a
    -  self
    -end
    -
    -
    - -
    -

    - - #to_h(&blk) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.to_h -> Hash ary.to_h{|item| … } -> Hash

    - -

    Returns the result of interpreting array as an array of [key, value] pairs. If a block is given, it should return [key, value] pairs to construct a hash.

    - -
    [[:foo, :bar], [1, 2]].to_h
    -  # => {:foo => :bar, 1 => 2}
    -[1, 2].to_h{|x| [x, x*2]}
    -  # => {1 => 2, 2 => 4}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -862
    -863
    -864
    -865
    -866
    -867
    -868
    -869
    -870
    -871
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 862
    -
    -def to_h(&blk)
    -  h = {}
    -  self.each do |v|
    -    v = blk.call(v) if blk
    -    raise TypeError, "wrong element type #{v.class}" unless Array === v
    -    raise ArgumentError, "wrong array length (expected 2, was #{v.length})" unless v.length == 2
    -    h[v[0]] = v[1]
    -  end
    -  h
    -end
    -
    -
    - -
    -

    - - #transposeObject - - - - - -

    -
    - -

    call-seq: ary.transpose -> new_ary

    - -

    Assumes that self is an array of arrays and transposes the rows and columns.

    - -

    If the length of the subarrays don’t match, an IndexError is raised.

    - -

    Examples:

    - -

    a = [[1,2], [3,4], [5,6]] a.transpose #=> [[1, 3, 5], [2, 4, 6]]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -833
    -834
    -835
    -836
    -837
    -838
    -839
    -840
    -841
    -842
    -843
    -844
    -845
    -846
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 833
    -
    -def transpose
    -  return [] if empty?
    -
    -  column_count = nil
    -  self.each do |row|
    -    raise TypeError unless row.is_a?(Array)
    -    column_count ||= row.size
    -    raise IndexError, 'element size differs' unless column_count == row.size
    -  end
    -
    -  Array.new(column_count) do |column_index|
    -    self.map { |row| row[column_index] }
    -  end
    -end
    -
    -
    - -
    -

    - - #union(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.union(other_ary,…) -> new_ary

    - -

    Set Union—Returns a new array by joining this array with other_ary, removing duplicates.

    - -

    [“a”, “b”, “c”].union([“c”, “d”, “a”], [“a”, “c”, “e”]) #=> [“a”, “b”, “c”, “d”, “e”]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -134
    -135
    -136
    -137
    -138
    -139
    -140
    -141
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 134
    -
    -def union(*args)
    -  ary = self.dup
    -  args.each do |x|
    -    ary.concat(x)
    -    ary.uniq!
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #uniq(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.uniq -> new_ary ary.uniq { |item| … } -> new_ary

    - -

    Returns a new array by removing duplicate values in self.

    - -

    a = [ “a”, “a”, “b”, “b”, “c” ] a.uniq #=> [“a”, “b”, “c”]

    - -

    b = [[“student”,“sam”], [“student”,“george”], [“teacher”,“matz”]] b.uniq { |s| s.first } # => [[“student”, “sam”], [“teacher”, “matz”]]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -53
    -54
    -55
    -56
    -57
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 53
    -
    -def uniq(&block)
    -  ary = self[0..-1]
    -  ary.uniq!(&block)
    -  ary
    -end
    -
    -
    - -
    -

    - - #uniq!(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary.uniq! -> ary or nil ary.uniq! { |item| … } -> ary or nil

    - -

    Removes duplicate elements from self. Returns nil if no changes are made (that is, no duplicates are found).

    - -

    a = [ “a”, “a”, “b”, “b”, “c” ] a.uniq! #=> [“a”, “b”, “c”] b = [ “a”, “b”, “c” ] b.uniq! #=> nil c = [[“student”,“sam”], [“student”,“george”], [“teacher”,“matz”]] c.uniq! { |s| s.first } # => [[“student”, “sam”], [“teacher”, “matz”]]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 18
    -
    -def uniq!(&block)
    -  hash = {}
    -  if block
    -    self.each do |val|
    -      key = block.call(val)
    -      hash[key] = val unless hash.key?(key)
    -    end
    -    result = hash.values
    -  else
    -    hash = {}
    -    self.each do |val|
    -      hash[val] = val
    -    end
    -    result = hash.keys
    -  end
    -  if result.size == self.size
    -    nil
    -  else
    -    self.replace(result)
    -  end
    -end
    -
    -
    - -
    -

    - - #|(elem) ⇒ Object - - - - - -

    -
    - -

    call-seq: ary | other_ary -> new_ary

    - -

    Set Union—Returns a new array by joining this array with other_ary, removing duplicates.

    - -

    [ “a”, “b”, “c” ] | [ “c”, “d”, “a” ] #=> [ “a”, “b”, “c”, “d” ]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -117
    -118
    -119
    -120
    -121
    -122
    -
    -
    # File 'mrbgems/mruby-array-ext/mrblib/array.rb', line 117
    -
    -def |(elem)
    -  raise TypeError, "can't convert #{elem.class} into Array" unless elem.class == Array
    -
    -  ary = self + elem
    -  ary.uniq! or ary
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/BasicObject.html b/docs/api/BasicObject.html deleted file mode 100644 index e96ed96..0000000 --- a/docs/api/BasicObject.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - Class: BasicObject - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: BasicObject - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/00class.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #!=(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -
    -
    # File 'mrblib/00class.rb', line 2
    -
    -def !=(other)
    -  if self == other
    -    false
    -  else
    -    true
    -  end
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/BasicSocket.html b/docs/api/BasicSocket.html deleted file mode 100644 index deed512..0000000 --- a/docs/api/BasicSocket.html +++ /dev/null @@ -1,686 +0,0 @@ - - - - - - - Class: BasicSocket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: BasicSocket - - - -

    -
    - -
    -
    Inherits:
    -
    - IO - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - -
    -

    Direct Known Subclasses

    -

    IPSocket, Socket, UNIXSocket

    -
    - - -

    - Constant Summary - collapse -

    - -
    - -
    @@do_not_reverse_lookup = - -
    -
    true
    - -
    - - - - - -

    Instance Attribute Summary collapse

    - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(*args) ⇒ BasicSocket - - - - - -

    -
    - -

    Returns a new instance of BasicSocket.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -176
    -177
    -178
    -179
    -180
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 176
    -
    -def initialize(*args)
    -  super(*args)
    -  self._is_socket = true
    -  @do_not_reverse_lookup = @@do_not_reverse_lookup
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #do_not_reverse_lookupObject - - - - - -

    -
    - -

    Returns the value of attribute do_not_reverse_lookup.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -205
    -206
    -207
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 205
    -
    -def do_not_reverse_lookup
    -  @do_not_reverse_lookup
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .do_not_reverse_lookupObject - - - - - -

    - - - - -
    -
    -
    -
    -168
    -169
    -170
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 168
    -
    -def self.do_not_reverse_lookup
    -  @@do_not_reverse_lookup
    -end
    -
    -
    - -
    -

    - - .do_not_reverse_lookup=(val) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -172
    -173
    -174
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 172
    -
    -def self.do_not_reverse_lookup=(val)
    -  @@do_not_reverse_lookup = val ? true : false
    -end
    -
    -
    - -
    -

    - - .for_fd(fd) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -182
    -183
    -184
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 182
    -
    -def self.for_fd(fd)
    -  super(fd, "r+")
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #local_addressObject - - - - - -

    -
    - -

    def connect_address

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -188
    -189
    -190
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 188
    -
    -def local_address
    -  Addrinfo.new self.getsockname
    -end
    -
    -
    - -
    -

    - - #recv_nonblock(maxlen, flags = 0) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -192
    -193
    -194
    -195
    -196
    -197
    -198
    -199
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 192
    -
    -def recv_nonblock(maxlen, flags=0)
    -  begin
    -    _setnonblock(true)
    -    recv(maxlen, flags)
    -  ensure
    -    _setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #remote_addressObject - - - - - -

    - - - - -
    -
    -
    -
    -201
    -202
    -203
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 201
    -
    -def remote_address
    -  Addrinfo.new self.getpeername
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/CMath.html b/docs/api/CMath.html deleted file mode 100644 index 82495db..0000000 --- a/docs/api/CMath.html +++ /dev/null @@ -1,928 +0,0 @@ - - - - - - - Module: CMath - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: CMath - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-cmath/src/cmath.c
    -
    - -
    - - - - - - - - - -

    - Class Method Summary - collapse -

    - - - - - - -
    -

    Class Method Details

    - - -
    -

    - - .acosObject - - - - - -

    -
    - -
    -

    - - .acoshObject - - - - - -

    -
    - -
    -

    - - .asinObject - - - - - -

    -
    - -
    -

    - - .asinhObject - - - - - -

    -
    - -
    -

    - - .atanObject - - - - - -

    -
    - -
    -

    - - .atanhObject - - - - - -

    -
    - -
    -

    - - .cosObject - - - - - -

    -
    - -
    -

    - - .coshObject - - - - - -

    -
    - -
    -

    - - .expObject - - - - - -

    -
    - -
    -

    - - .logObject - - - - - -

    -
    - -

    log(z): return the natural logarithm of z, with branch cut along the negative real axis

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -
    -
    # File 'mrbgems/mruby-cmath/src/cmath.c', line 145
    -
    -DEF_CMATH_METHOD(exp)
    -
    -/* log(z): return the natural logarithm of z, with branch cut along the negative real axis */
    -static mrb_value
    -cmath_log(mrb_state *mrb, mrb_value self) {
    -  mrb_value z;
    -  mrb_float base;
    -  mrb_float real, imag;
    -
    -  mrb_int n = mrb_get_args(mrb, "o|f", &z, &base);
    -
    -#ifndef M_E
    -#define M_E F(exp)(1.0)
    -#endif
    -
    -  if (n == 1) base = M_E;
    -  if (cmath_get_complex(mrb, z, &real, &imag) || real < 0.0) {
    -    mrb_complex c = CX(real,imag);
    -    c = FC(log)(c);
    -    if (n == 2) c = CXDIVc(c, FC(log)(CX(base,0)));
    -    return mrb_complex_new(mrb, creal(c), cimag(c));
    -  }
    -  if (n == 1) return mrb_float_value(mrb, F(log)(real));
    -  return mrb_float_value(mrb, F(log)(real)/F(log)(base));
    -}
    -
    -
    - -
    -

    - - .log10Object - - - - - -

    -
    - -

    log10(z): return the base-10 logarithm of z, with branch cut along the negative real axis

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -182
    -
    -
    # File 'mrbgems/mruby-cmath/src/cmath.c', line 172
    -
    -static mrb_value
    -cmath_log10(mrb_state *mrb, mrb_value self) {
    -  mrb_value z = mrb_get_arg1(mrb);
    -  mrb_float real, imag;
    -  if (cmath_get_complex(mrb, z, &real, &imag) || real < 0.0) {
    -    mrb_complex c = CX(real,imag);
    -    c = CXDIVf(FC(log)(c),log(10));
    -    return mrb_complex_new(mrb, creal(c), cimag(c));
    -  }
    -  return mrb_float_value(mrb, F(log10)(real));
    -}
    -
    -
    - -
    -

    - - .log2Object - - - - - -

    -
    - -

    log2(z): return the base-2 logarithm of z, with branch cut along the negative real axis

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -193
    -194
    -195
    -
    -
    # File 'mrbgems/mruby-cmath/src/cmath.c', line 185
    -
    -static mrb_value
    -cmath_log2(mrb_state *mrb, mrb_value self) {
    -  mrb_value z = mrb_get_arg1(mrb);
    -  mrb_float real, imag;
    -  if (cmath_get_complex(mrb, z, &real, &imag) || real < 0.0) {
    -    mrb_complex c = CX(real,imag);
    -    c = CXDIVf(FC(log)(c),log(2.0));
    -    return mrb_complex_new(mrb, creal(c), cimag(c));
    -  }
    -  return mrb_float_value(mrb, F(log2)(real));
    -}
    -
    -
    - -
    -

    - - .sinObject - - - - - -

    -
    - -
    -

    - - .sinhObject - - - - - -

    -
    - -
    -

    - - .sqrtObject - - - - - -

    -
    - -

    sqrt(z): return square root of z

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -198
    -199
    -200
    -201
    -202
    -203
    -204
    -205
    -206
    -207
    -208
    -
    -
    # File 'mrbgems/mruby-cmath/src/cmath.c', line 198
    -
    -static mrb_value
    -cmath_sqrt(mrb_state *mrb, mrb_value self) {
    -  mrb_value z = mrb_get_arg1(mrb);
    -  mrb_float real, imag;
    -  if (cmath_get_complex(mrb, z, &real, &imag) || real < 0.0) {
    -    mrb_complex c = CX(real,imag);
    -    c = FC(sqrt)(c);
    -    return mrb_complex_new(mrb, creal(c), cimag(c));
    -  }
    -  return mrb_float_value(mrb, F(sqrt)(real));
    -}
    -
    -
    - -
    -

    - - .tanObject - - - - - -

    -
    - -
    -

    - - .tanhObject - - - - - -

    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Comparable.html b/docs/api/Comparable.html deleted file mode 100644 index d0a8af0..0000000 --- a/docs/api/Comparable.html +++ /dev/null @@ -1,767 +0,0 @@ - - - - - - - Module: Comparable - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Comparable - - - -

    -
    - - - - - - - - - -
    -
    Included in:
    -
    Numeric, String, Symbol
    -
    - - - -
    -
    Defined in:
    -
    mrblib/compar.rb,
    - mrbgems/mruby-compar-ext/mrblib/compar.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Comparable

    - -

    ISO 15.3.3

    - - -
    -
    -
    - - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #<(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj < other -> true or false

    - -

    Return true if self is less than other. Otherwise return false.

    - -

    ISO 15.3.3.2.1

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -
    -
    # File 'mrblib/compar.rb', line 16
    -
    -def < other
    -  cmp = self <=> other
    -  if cmp.nil?
    -    raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
    -  end
    -  cmp < 0
    -end
    -
    -
    - -
    -

    - - #<=(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj <= other -> true or false

    - -

    Return true if self is less than or equal to other. Otherwise return false.

    - -

    ISO 15.3.3.2.2

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -
    -
    # File 'mrblib/compar.rb', line 33
    -
    -def <= other
    -  cmp = self <=> other
    -  if cmp.nil?
    -    raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
    -  end
    -  cmp <= 0
    -end
    -
    -
    - -
    -

    - - #==(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj == other -> true or false

    - -

    Return true if self is equal to other. Otherwise return false.

    - -

    ISO 15.3.3.2.3

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -50
    -51
    -52
    -53
    -
    -
    # File 'mrblib/compar.rb', line 50
    -
    -def == other
    -  cmp = self <=> other
    -  cmp.equal?(0)
    -end
    -
    -
    - -
    -

    - - #>(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj > other -> true or false

    - -

    Return true if self is greater than other. Otherwise return false.

    - -

    ISO 15.3.3.2.4

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -
    -
    # File 'mrblib/compar.rb', line 64
    -
    -def > other
    -  cmp = self <=> other
    -  if cmp.nil?
    -    raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
    -  end
    -  cmp > 0
    -end
    -
    -
    - -
    -

    - - #>=(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj >= other -> true or false

    - -

    Return true if self is greater than or equal to other. Otherwise return false.

    - -

    ISO 15.3.3.2.5

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -
    -
    # File 'mrblib/compar.rb', line 81
    -
    -def >= other
    -  cmp = self <=> other
    -  if cmp.nil?
    -    raise ArgumentError, "comparison of #{self.class} with #{other.class} failed"
    -  end
    -  cmp >= 0
    -end
    -
    -
    - -
    -

    - - #between?(min, max) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: obj.between?(min,max) -> true or false

    - -

    Return true if self is greater than or equal to min and less than or equal to max. Otherwise return false.

    - -

    ISO 15.3.3.2.6

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -99
    -100
    -101
    -
    -
    # File 'mrblib/compar.rb', line 99
    -
    -def between?(min, max)
    -  self >= min and self <= max
    -end
    -
    -
    - -
    -

    - - #clamp(min, max = nil) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj.clamp(min, max) -> obj obj.clamp(range) -> obj

    - -

    In (min, max) form, returns min if obj <=> min is less than zero, max if obj <=> max is greater than zero, and obj otherwise.

    - -

    12.clamp(0, 100) #=> 12 523.clamp(0, 100) #=> 100 -3.123.clamp(0, 100) #=> 0

    - -

    ‘d’.clamp(‘a’, ‘f’) #=> ‘d’ ‘z’.clamp(‘a’, ‘f’) #=> ‘f’

    - -

    In (range) form, returns range.begin if obj <=> range.begin is less than zero, range.end if obj <=> range.end is greater than zero, and obj otherwise.

    - -

    12.clamp(0..100) #=> 12 523.clamp(0..100) #=> 100 -3.123.clamp(0..100) #=> 0

    - -

    ‘d’.clamp(‘a’..‘f’) #=> ‘d’ ‘z’.clamp(‘a’..‘f’) #=> ‘f’

    - -

    If range.begin is nil, it is considered smaller than obj, and if range.end is nil, it is considered greater than obj.

    - -

    -20.clamp(0..) #=> 0 523.clamp(..100) #=> 100

    - -

    When range.end is excluded and not nil, an exception is raised.

    - -
    100.clamp(0...100)       # ArgumentError
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -
    -
    # File 'mrbgems/mruby-compar-ext/mrblib/compar.rb', line 43
    -
    -def clamp(min, max=nil)
    -
    -  if max.nil?
    -    if min.kind_of?(Range)
    -      max = min.end
    -      if !max.nil? && min.exclude_end?
    -        raise ArgumentError, "cannot clamp with an exclusive range"
    -      end
    -      min = min.begin
    -    end
    -  end
    -
    -  if !min.nil? && !max.nil?
    -    cmp = min <=> max
    -    if cmp.nil?
    -      raise ArgumentError, "comparison of #{min.class} with #{max.class} failed"
    -    elsif cmp > 0
    -      raise ArgumentError, "min argument must be smaller than max argument"
    -    end
    -  end
    -
    -  unless min.nil?
    -    cmp = self <=> min
    -    return self if cmp == 0
    -    return min if cmp < 0
    -  end
    -  unless max.nil?
    -    cmp = self <=> max
    -    return max if cmp > 0
    -  end
    -  return self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Complex.html b/docs/api/Complex.html deleted file mode 100644 index e341a0b..0000000 --- a/docs/api/Complex.html +++ /dev/null @@ -1,1069 +0,0 @@ - - - - - - - Class: Complex - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Complex - - - -

    -
    - -
    -
    Inherits:
    -
    - Numeric - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-complex/mrblib/complex.rb
    -
    - -
    - - - - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from Numeric

    -

    #integer?, #negative?, #nonzero?, #positive?, #zero?

    - - - - - - - - - -

    Methods included from Comparable

    -

    #<, #<=, #==, #>, #>=, #between?, #clamp

    - - -
    -

    Class Method Details

    - - -
    -

    - - .polar(abs, arg = 0) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 2
    -
    -def self.polar(abs, arg = 0)
    -  Complex(abs * Math.cos(arg), abs * Math.sin(arg))
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #+@Object - - - - - -

    - - - - -
    -
    -
    -
    -14
    -15
    -16
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 14
    -
    -def +@
    -  self
    -end
    -
    -
    - -
    -

    - - #-@Object - - - - - -

    - - - - -
    -
    -
    -
    -18
    -19
    -20
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 18
    -
    -def -@
    -  Complex(-real, -imaginary)
    -end
    -
    -
    - -
    -

    - - #<=>(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -22
    -23
    -24
    -25
    -26
    -27
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 22
    -
    -def <=>(other)
    -  return nil unless other.kind_of?(Numeric)
    -  self.to_f <=> other.to_f
    -rescue
    -  nil
    -end
    -
    -
    - -
    -

    - - #absObject - - - - Also known as: - magnitude - - - - -

    - - - - -
    -
    -
    -
    -29
    -30
    -31
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 29
    -
    -def abs
    -  Math.hypot imaginary, real
    -end
    -
    -
    - -
    -

    - - #abs2Object - - - - - -

    - - - - -
    -
    -
    -
    -34
    -35
    -36
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 34
    -
    -def abs2
    -  real * real + imaginary * imaginary
    -end
    -
    -
    - -
    -

    - - #argObject - - - - Also known as: - angle, phase - - - - -

    - - - - -
    -
    -
    -
    -38
    -39
    -40
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 38
    -
    -def arg
    -  Math.atan2 imaginary, real
    -end
    -
    -
    - -
    -

    - - #conjugateObject - - - - Also known as: - conj - - - - -

    - - - - -
    -
    -
    -
    -44
    -45
    -46
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 44
    -
    -def conjugate
    -  Complex(real, -imaginary)
    -end
    -
    -
    - -
    -

    - - #fdiv(numeric) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -49
    -50
    -51
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 49
    -
    -def fdiv(numeric)
    -  Complex(real / numeric, imaginary / numeric)
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    - - - - -
    -
    -
    -
    -6
    -7
    -8
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 6
    -
    -def inspect
    -  "(#{to_s})"
    -end
    -
    -
    - -
    -

    - - #polarObject - - - - - -

    - - - - -
    -
    -
    -
    -53
    -54
    -55
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 53
    -
    -def polar
    -  [abs, arg]
    -end
    -
    -
    - -
    -

    - - #real?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -57
    -58
    -59
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 57
    -
    -def real?
    -  false
    -end
    -
    -
    - -
    -

    - - #rectangularObject - - - - Also known as: - rect - - - - -

    - - - - -
    -
    -
    -
    -61
    -62
    -63
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 61
    -
    -def rectangular
    -  [real, imaginary]
    -end
    -
    -
    - -
    -

    - - #to_cObject - - - - - -

    - - - - -
    -
    -
    -
    -66
    -67
    -68
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 66
    -
    -def to_c
    -  self
    -end
    -
    -
    - -
    -

    - - #to_rObject - - - - - -

    - - - - -
    -
    -
    -
    -70
    -71
    -72
    -73
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 70
    -
    -def to_r
    -  raise RangeError.new "can't convert #{to_s} into Rational" unless imaginary.zero?
    -  Rational(real, 1)
    -end
    -
    -
    - -
    -

    - - #to_sObject - - - - - -

    - - - - -
    -
    -
    -
    -10
    -11
    -12
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 10
    -
    -def to_s
    -  "#{real}#{'+' unless imaginary < 0}#{imaginary}#{'*' unless imaginary.finite?}i"
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Dir.html b/docs/api/Dir.html deleted file mode 100644 index e91fe41..0000000 --- a/docs/api/Dir.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - - - - Class: Dir - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Dir - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-dir/mrblib/dir.rb
    -
    - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    - - -
    -

    Class Method Details

    - - -
    -

    - - .chdir(path, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -77
    -78
    -79
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 67
    -
    -def chdir(path, &block)
    -  if block
    -    wd = self.getwd
    -    begin
    -      self._chdir(path)
    -      block.call(path)
    -    ensure
    -      self._chdir(wd)
    -    end
    -  else
    -    self._chdir(path)
    -  end
    -end
    -
    -
    - -
    -

    - - .children(path) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 34
    -
    -def children(path)
    -  a = []
    -  self.open(path) do |d|
    -    while s = d.read
    -      a << s unless s == "." || s == ".."
    -    end
    -  end
    -  a
    -end
    -
    -
    - -
    -

    - - .entries(path) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 24
    -
    -def entries(path)
    -  a = []
    -  self.open(path) do |d|
    -    while s = d.read
    -      a << s
    -    end
    -  end
    -  a
    -end
    -
    -
    - -
    -

    - - .foreach(path, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -44
    -45
    -46
    -47
    -48
    -49
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 44
    -
    -def foreach(path, &block)
    -  return to_enum(:foreach, path) unless block
    -  self.open(path) do |d|
    -    d.each(&block)
    -  end
    -end
    -
    -
    - -
    -

    - - .open(path, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 51
    -
    -def open(path, &block)
    -  if block
    -    d = self.new(path)
    -    begin
    -      block.call(d)
    -    ensure
    -      begin
    -        d.close
    -      rescue IOError
    -      end
    -    end
    -  else
    -    self.new(path)
    -  end
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -4
    -5
    -6
    -7
    -8
    -9
    -10
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 4
    -
    -def each(&block)
    -  return to_enum(:each) unless block
    -  while s = self.read
    -    block.call(s)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_child(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -
    -
    # File 'mrbgems/mruby-dir/mrblib/dir.rb', line 12
    -
    -def each_child(&block)
    -  return to_enum(:each_child) unless block
    -  while s = self.read
    -    block.call(s) unless s == "." || s == ".."
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/EOFError.html b/docs/api/EOFError.html deleted file mode 100644 index ccf4221..0000000 --- a/docs/api/EOFError.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Exception: EOFError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: EOFError - - - -

    -
    - -
    -
    Inherits:
    -
    - IOError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-io/mrblib/io.rb
    -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerable.html b/docs/api/Enumerable.html deleted file mode 100644 index 7359abc..0000000 --- a/docs/api/Enumerable.html +++ /dev/null @@ -1,4937 +0,0 @@ - - - - - - - Module: Enumerable - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Enumerable - - - -

    -
    - - - - - - - - - -
    -
    Included in:
    -
    Array, Dir, Enumerator, Enumerator::Chain, Enumerator::Generator, Hash, Range, Set, Struct
    -
    - - - -
    -
    Defined in:
    -
    mrblib/enum.rb,
    - mrbgems/mruby-enum-ext/mrblib/enum.rb,
    mrbgems/mruby-enum-lazy/mrblib/lazy.rb,
    mrbgems/mruby-enum-chain/mrblib/chain.rb,
    mrbgems/mruby-enumerator/mrblib/enumerator.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    chain.rb Enumerator::Chain class See Copyright Notice in mruby.h

    - - -
    -
    -
    - - -
    - - - -

    - Constant Summary - collapse -

    - -
    - -
    NONE = - -
    -
    Object.new
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #all?(pat = NONE, &block) ⇒ Boolean - - - - - -

    -
    - -

    ISO 15.3.2.2.1 call-seq: enum.all? [{ |obj| block } ] -> true or false enum.all?(pattern) -> true or false

    - -

    Passes each element of the collection to the given block. The method returns true if the block never returns false or nil. If the block is not given, Ruby adds an implicit block of { |obj| obj } which will cause #all? to return true when none of the collection members are false or nil.

    - -

    If a pattern is supplied instead, the method returns whether pattern === element for every collection member.

    - -
    %w[ant bear cat].all? { |word| word.length >= 3 } #=> true
    -%w[ant bear cat].all? { |word| word.length >= 4 } #=> false
    -%w[ant bear cat].all?(/t/)                        #=> false
    -[1, 2i, 3.14].all?(Numeric)                       #=> true
    -[nil, true, 99].all?                              #=> false
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -
    -
    # File 'mrblib/enum.rb', line 26
    -
    -def all?(&block)
    -  if block
    -    self.each{|*val| return false unless block.call(*val)}
    -  else
    -    self.each{|*val| return false unless val.__svalue}
    -  end
    -  true
    -end
    -
    -
    - -
    -

    - - #any?(pat = NONE, &block) ⇒ Boolean - - - - - -

    -
    - -

    ISO 15.3.2.2.2 call-seq: enum.any? [{ |obj| block }] -> true or false enum.any?(pattern) -> true or false

    - -

    Passes each element of the collection to the given block. The method returns true if the block ever returns a value other than false or nil. If the block is not given, Ruby adds an implicit block of { |obj| obj } that will cause #any? to return true if at least one of the collection members is not false or nil.

    - -

    If a pattern is supplied instead, the method returns whether pattern === element for any collection member.

    - -
    %w[ant bear cat].any? { |word| word.length >= 3 } #=> true
    -%w[ant bear cat].any? { |word| word.length >= 4 } #=> true
    -%w[ant bear cat].any?(/d/)                        #=> false
    -[nil, true, 99].any?(Integer)                     #=> true
    -[nil, true, 99].any?                              #=> true
    -[].any?                                           #=> false
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -
    -
    # File 'mrblib/enum.rb', line 43
    -
    -def any?(&block)
    -  if block
    -    self.each{|*val| return true if block.call(*val)}
    -  else
    -    self.each{|*val| return true if val.__svalue}
    -  end
    -  false
    -end
    -
    -
    - -
    -

    - - #chain(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -6
    -7
    -8
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 6
    -
    -def chain(*args)
    -  Enumerator::Chain.new(self, *args)
    -end
    -
    -
    - -
    -

    - - #chunk(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.chunk -> enumerator enum.chunk { |arr| block } -> enumerator

    - -

    Each element in the returned enumerator is a 2-element array consisting of:

    -
    • -

      A value returned by the block.

      -
    • -

      An array (“chunk”) containing the element for which that value was returned, and all following elements for which the block returned the same value:

      -
    - -

    So that:

    -
    • -

      Each block return value that is different from its predecessor begins a new chunk.

      -
    • -

      Each block return value that is the same as its predecessor continues the same chunk.

      -
    - -

    Example:

    - -
    e = (0..10).chunk {|i| (i / 3).floor } # => #<Enumerator: ...>
    -# The enumerator elements.
    -e.next # => [0, [0, 1, 2]]
    -e.next # => [1, [3, 4, 5]]
    -e.next # => [2, [6, 7, 8]]
    -e.next # => [3, [9, 10]]
    -
    - -

    You can use the special symbol :_alone to force an element into its own separate chuck:

    - -
    a = [0, 0, 1, 1]
    -e = a.chunk{|i| i.even? ? :_alone : true }
    -e.to_a # => [[:_alone, [0]], [:_alone, [0]], [true, [1, 1]]]
    -
    - -

    You can use the special symbol :_separator or nil to force an element to be ignored (not included in any chunk):

    - -
    a = [0, 0, -1, 1, 1]
    -e = a.chunk{|i| i < 0 ? :_separator : true }
    -e.to_a # => [[true, [0, 0]], [true, [1, 1]]]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -745
    -746
    -747
    -748
    -749
    -750
    -751
    -752
    -753
    -754
    -755
    -756
    -757
    -758
    -759
    -760
    -761
    -762
    -763
    -764
    -765
    -766
    -767
    -768
    -769
    -770
    -771
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 745
    -
    -def chunk(&block)
    -  return to_enum :chunk unless block
    -
    -  enum = self
    -  Enumerator.new do |y|
    -    last_value, arr = nil, []
    -    enum.each do |element|
    -      value = block.call(element)
    -      case value
    -      when :_alone
    -        y.yield [last_value, arr] if arr.size > 0
    -        y.yield [value, [element]]
    -        last_value, arr = nil, []
    -      when :_separator, nil
    -        y.yield [last_value, arr] if arr.size > 0
    -        last_value, arr = nil, []
    -      when last_value
    -        arr << element
    -      else
    -        raise 'symbols beginning with an underscore are reserved' if value.is_a?(Symbol) && value.to_s[0] == '_'
    -        y.yield [last_value, arr] if arr.size > 0
    -        last_value, arr = value, [element]
    -      end
    -    end
    -    y.yield [last_value, arr] if arr.size > 0
    -  end
    -end
    -
    -
    - -
    -

    - - #chunk_while(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.chunk_while {|elt_before, elt_after| bool } -> an_enumerator

    - -

    Creates an enumerator for each chunked elements. The beginnings of chunks are defined by the block.

    - -

    This method splits each chunk using adjacent elements, elt_before and elt_after, in the receiver enumerator. This method split chunks between elt_before and elt_after where the block returns false.

    - -

    The block is called the length of the receiver enumerator minus one.

    - -

    The result enumerator yields the chunked elements as an array. So each method can be called as follows:

    - -

    enum.chunk_while { |elt_before, elt_after| bool }.each { |ary| … }

    - -

    Other methods of the Enumerator class and Enumerable module, such as to_a, map, etc., are also usable.

    - -

    For example, one-by-one increasing subsequence can be chunked as follows:

    - -

    a = [1,2,4,9,10,11,12,15,16,19,20,21] b = a.chunk_while {|i, j| i+1 == j } p b.to_a #=> [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]] c = b.map {|a| a.length < 3 ? a : “#{a.first}-#Enumerable.aa.last” } p c #=> [[1, 2], [4], “9-12”, [15, 16], “19-21”] d = c.join(“,”) p d #=> “1,2,4,9-12,15,16,19-21”

    - -

    Increasing (non-decreasing) subsequence can be chunked as follows:

    - -

    a = [0, 9, 2, 2, 3, 2, 7, 5, 9, 5] p a.chunk_while {|i, j| i <= j }.to_a #=> [[0, 9], [2, 2, 3], [2, 7], [5, 9], [5]]

    - -

    Adjacent evens and odds can be chunked as follows: (Enumerable#chunk is another way to do it.)

    - -

    a = [7, 5, 9, 2, 0, 7, 9, 4, 2, 0] p a.chunk_while {|i, j| i.even? == j.even? }.to_a #=> [[7, 5, 9], [2, 0], [7, 9], [4, 2, 0]]

    - -

    Enumerable#slice_when does the same, except splitting when the block returns true instead of false.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -823
    -824
    -825
    -826
    -827
    -828
    -829
    -830
    -831
    -832
    -833
    -834
    -835
    -836
    -837
    -838
    -839
    -840
    -841
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 823
    -
    -def chunk_while(&block)
    -  enum = self
    -  Enumerator.new do |y|
    -    n = 0
    -    last_value, arr = nil, []
    -    enum.each do |element|
    -      if n > 0
    -        unless block.call(last_value, element)
    -          y.yield arr
    -          arr = []
    -        end
    -      end
    -      arr.push(element)
    -      n += 1
    -      last_value = element
    -    end
    -    y.yield arr if arr.size > 0
    -  end
    -end
    -
    -
    - -
    -

    - - #collect(&block) ⇒ Object - - - - Also known as: - map - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Append all values of each block together and return this value.

    - -

    ISO 15.3.2.2.3

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -
    -
    # File 'mrblib/enum.rb', line 59
    -
    -def collect(&block)
    -  return to_enum :collect unless block
    -
    -  ary = []
    -  self.each{|*val| ary.push(block.call(*val))}
    -  ary
    -end
    -
    -
    - -
    -

    - - #count(v = NONE, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.count -> int enum.count(item) -> int enum.count { |obj| block } -> int

    - -

    Returns the number of items in enum through enumeration. If an argument is given, the number of items in enum that are equal to item are counted. If a block is given, it counts the number of elements yielding a true value.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -238
    -239
    -240
    -241
    -242
    -243
    -244
    -245
    -246
    -247
    -248
    -249
    -250
    -251
    -252
    -253
    -254
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 238
    -
    -def count(v=NONE, &block)
    -  count = 0
    -  if block
    -    self.each do |*val|
    -      count += 1 if block.call(*val)
    -    end
    -  else
    -    if NONE.equal?(v)
    -      self.each { count += 1 }
    -    else
    -      self.each do |*val|
    -        count += 1 if val.__svalue == v
    -      end
    -    end
    -  end
    -  count
    -end
    -
    -
    - -
    -

    - - #cycle(nv = nil, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.cycle(n=nil) { |obj| block } -> nil enum.cycle(n=nil) -> an_enumerator

    - -

    Calls block for each element of enum repeatedly n 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.

    - -

    Enumerable#cycle saves elements in an internal array so changes to enum after the first pass have no effect.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    a = ["a", "b", "c"]
    -a.cycle { |x| puts x }  # print, a, b, c, a, b, c,.. forever.
    -a.cycle(2) { |x| puts x }  # print, a, b, c, a, b, c.
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -653
    -654
    -655
    -656
    -657
    -658
    -659
    -660
    -661
    -662
    -663
    -664
    -665
    -666
    -667
    -668
    -669
    -670
    -671
    -672
    -673
    -674
    -675
    -676
    -677
    -678
    -679
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 653
    -
    -def cycle(nv = nil, &block)
    -  return to_enum(:cycle, nv) unless block
    -
    -  n = nil
    -
    -  if nv.nil?
    -    n = -1
    -  else
    -    n = nv.__to_int
    -    return nil if n <= 0
    -  end
    -
    -  ary = []
    -  each do |*i|
    -    ary.push(i)
    -    yield(*i)
    -  end
    -  return nil if ary.empty?
    -
    -  while n < 0 || 0 < (n -= 1)
    -    ary.each do |i|
    -      yield(*i)
    -    end
    -  end
    -
    -  nil
    -end
    -
    -
    - -
    -

    - - #detect(ifnone = nil, &block) ⇒ Object - - - - Also known as: - find - - - - -

    -
    - -

    Return the first element for which value from the block is true. If no object matches, calls ifnone and returns its result. Otherwise returns nil.

    - -

    ISO 15.3.2.2.4

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -
    -
    # File 'mrblib/enum.rb', line 75
    -
    -def detect(ifnone=nil, &block)
    -  return to_enum :detect, ifnone unless block
    -
    -  self.each{|*val|
    -    if block.call(*val)
    -      return val.__svalue
    -    end
    -  }
    -  ifnone.call unless ifnone.nil?
    -end
    -
    -
    - -
    -

    - - #drop(n) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.drop(n) -> array

    - -

    Drops first n elements from enum, and returns rest elements in an array.

    - -

    a = [1, 2, 3, 4, 5, 0] a.drop(3) #=> [4, 5, 0]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 15
    -
    -def drop(n)
    -  n = n.__to_int
    -  raise ArgumentError, "attempt to drop negative size" if n < 0
    -
    -  ary = []
    -  self.each {|*val| n == 0 ? ary << val.__svalue : n -= 1 }
    -  ary
    -end
    -
    -
    - -
    -

    - - #drop_while(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.drop_while {|arr| block } -> array enum.drop_while -> an_enumerator

    - -

    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.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    a = [1, 2, 3, 4, 5, 0] a.drop_while {|i| i < 3 } #=> [3, 4, 5, 0]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -47
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 38
    -
    -def drop_while(&block)
    -  return to_enum :drop_while unless block
    -
    -  ary, state = [], false
    -  self.each do |*val|
    -    state = true if !state and !block.call(*val)
    -    ary << val.__svalue if state
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #each_cons(n, &block) ⇒ nil - - - - - -

    -
    - -

    Iterates the given block for each array of consecutive <n> elements.

    - - -
    -
    -
    - -
    -

    Examples:

    - - -
    (1..10).each_cons(3) {|a| p a}
    -# outputs below
    -[1, 2, 3]
    -[2, 3, 4]
    -[3, 4, 5]
    -[4, 5, 6]
    -[5, 6, 7]
    -[6, 7, 8]
    -[7, 8, 9]
    -[8, 9, 10]
    - -
    - -

    Returns:

    -
      - -
    • - - - (nil) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 114
    -
    -def each_cons(n, &block)
    -  n = n.__to_int
    -  raise ArgumentError, "invalid size" if n <= 0
    -
    -  return to_enum(:each_cons,n) unless block
    -  ary = []
    -  n = n.to_i
    -  self.each do |*val|
    -    ary.shift if ary.size == n
    -    ary << val.__svalue
    -    block.call(ary.dup) if ary.size == n
    -  end
    -  nil
    -end
    -
    -
    - -
    -

    - - #each_entry(*args, &blk) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.each_entry { |obj| block } -> enum enum.each_entry -> an_enumerator

    - -

    Calls block once for each element in self, passing that element as a parameter, converting multiple values from yield to an array.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    class Foo include Enumerable def each yield 1 yield 1, 2 yield end end Foo.new.each_entry{ |o| p o }

    - -

    produces:

    - -

    1 [1, 2] nil

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -911
    -912
    -913
    -914
    -915
    -916
    -917
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 911
    -
    -def each_entry(*args, &blk)
    -  return to_enum(:each_entry) unless blk
    -  self.each do |*a|
    -    yield a.__svalue
    -  end
    -  return self
    -end
    -
    -
    - -
    -

    - - #each_slice(n, &block) ⇒ nil - - - - - -

    -
    - -

    Iterates the given block for each slice of <n> elements.

    - - -
    -
    -
    - -
    -

    Examples:

    - - -
    (1..10).each_slice(3) {|a| p a}
    -# outputs below
    -[1, 2, 3]
    -[4, 5, 6]
    -[7, 8, 9]
    -[10]
    - -
    - -

    Returns:

    -
      - -
    • - - - (nil) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 142
    -
    -def each_slice(n, &block)
    -  n = n.__to_int
    -  raise ArgumentError, "invalid slice size" if n <= 0
    -
    -  return to_enum(:each_slice,n) unless block
    -  ary = []
    -  n = n.to_i
    -  self.each do |*val|
    -    ary << val.__svalue
    -    if ary.size == n
    -      block.call(ary)
    -      ary = []
    -    end
    -  end
    -  block.call(ary) unless ary.empty?
    -  nil
    -end
    -
    -
    - -
    -

    - - #each_with_index(&block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Pass an index to the block which starts at 0 and increase by 1 for each element.

    - -

    ISO 15.3.2.2.5

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -93
    -94
    -95
    -96
    -97
    -98
    -99
    -100
    -101
    -102
    -
    -
    # File 'mrblib/enum.rb', line 93
    -
    -def each_with_index(&block)
    -  return to_enum :each_with_index unless block
    -
    -  i = 0
    -  self.each{|*val|
    -    block.call(val.__svalue, i)
    -    i += 1
    -  }
    -  self
    -end
    -
    -
    - -
    -

    - - #each_with_object(obj, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.each_with_object(obj) { |(*args), memo_obj| … } -> obj enum.each_with_object(obj) -> an_enumerator

    - -

    Iterates the given block for each element with an arbitrary object given, and returns the initially given object.

    - -

    If no block is given, returns an enumerator.

    - -
    (1..10).each_with_object([]) { |i, a| a << i*2 }
    -#=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -596
    -597
    -598
    -599
    -600
    -601
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 596
    -
    -def each_with_object(obj, &block)
    -  return to_enum(:each_with_object, obj) unless block
    -
    -  self.each {|*val| block.call(val.__svalue, obj) }
    -  obj
    -end
    -
    -
    - -
    -

    - - #entriesObject - - - - Also known as: - to_a - - - - -

    -
    - -

    Return an array of all elements which are yield by each.

    - -

    ISO 15.3.2.2.6

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -109
    -110
    -111
    -112
    -113
    -114
    -115
    -116
    -
    -
    # File 'mrblib/enum.rb', line 109
    -
    -def entries
    -  ary = []
    -  self.each{|*val|
    -    # __svalue is an internal method
    -    ary.push val.__svalue
    -  }
    -  ary
    -end
    -
    -
    - -
    -

    - - #filter_map(&blk) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -819
    -820
    -821
    -822
    -823
    -824
    -825
    -826
    -827
    -828
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 819
    -
    -def filter_map(&blk)
    -  return to_enum(:filter_map) unless blk
    -
    -  ary = []
    -  self.each do |x|
    -    x = blk.call(x)
    -    ary.push x if x
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #find_all(&block) ⇒ Object - - - - Also known as: - select - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Return an array which contains all elements whose block value was true.

    - -

    ISO 15.3.2.2.8

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -131
    -132
    -133
    -134
    -135
    -136
    -137
    -138
    -139
    -
    -
    # File 'mrblib/enum.rb', line 131
    -
    -def find_all(&block)
    -  return to_enum :find_all unless block
    -
    -  ary = []
    -  self.each{|*val|
    -    ary.push(val.__svalue) if block.call(*val)
    -  }
    -  ary
    -end
    -
    -
    - -
    -

    - - #find_index(val = NONE, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.find_index(value) -> int or nil enum.find_index { |obj| block } -> int or nil enum.find_index -> an_enumerator

    - -

    Compares each entry in enum with value or passes to block. Returns the index for the first for which the evaluated value is non-false. If no object matches, returns nil

    - -

    If neither block nor argument is given, an enumerator is returned instead.

    - -
    (1..10).find_index  { |i| i % 5 == 0 and i % 7 == 0 }  #=> nil
    -(1..100).find_index { |i| i % 5 == 0 and i % 7 == 0 }  #=> 34
    -(1..100).find_index(50)                                #=> 49
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -699
    -700
    -701
    -702
    -703
    -704
    -705
    -706
    -707
    -708
    -709
    -710
    -711
    -712
    -713
    -714
    -715
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 699
    -
    -def find_index(val=NONE, &block)
    -  return to_enum(:find_index, val) if !block && NONE.equal?(val)
    -
    -  idx = 0
    -  if block
    -    self.each do |*e|
    -      return idx if block.call(*e)
    -      idx += 1
    -    end
    -  else
    -    self.each do |*e|
    -      return idx if e.__svalue == val
    -      idx += 1
    -    end
    -  end
    -  nil
    -end
    -
    -
    - -
    -

    - - #first(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.first -> obj or nil enum.first(n) -> an_array

    - -

    Returns the first element, or the first n elements, of the enumerable. If the enumerable is empty, the first form returns nil, and the second form returns an empty array.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -205
    -206
    -207
    -208
    -209
    -210
    -211
    -212
    -213
    -214
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
    -223
    -224
    -225
    -226
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 205
    -
    -def first(*args)
    -  case args.length
    -  when 0
    -    self.each do |*val|
    -      return val.__svalue
    -    end
    -    return nil
    -  when 1
    -    i = args[0].__to_int
    -    raise ArgumentError, "attempt to take negative size" if i < 0
    -    ary = []
    -    return ary if i == 0
    -    self.each do |*val|
    -      ary << val.__svalue
    -      i -= 1
    -      break if i == 0
    -    end
    -    ary
    -  else
    -    raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 0..1)"
    -  end
    -end
    -
    -
    - -
    -

    - - #flat_map(&block) ⇒ Object - - - - Also known as: - collect_concat - - - - -

    -
    - -

    call-seq: enum.flat_map { |obj| block } -> array enum.collect_concat { |obj| block } -> array enum.flat_map -> an_enumerator enum.collect_concat -> an_enumerator

    - -

    Returns a new array with the concatenated results of running block once for every element in enum.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    [1, 2, 3, 4].flat_map { |e| [e, -e] } #=> [1, -1, 2, -2, 3, -3, 4, -4] [[1, 2], [3, 4]].flat_map { |e| e + [100] } #=> [1, 2, 100, 3, 4, 100]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -270
    -271
    -272
    -273
    -274
    -275
    -276
    -277
    -278
    -279
    -280
    -281
    -282
    -283
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 270
    -
    -def flat_map(&block)
    -  return to_enum :flat_map unless block
    -
    -  ary = []
    -  self.each do |*e|
    -    e2 = block.call(*e)
    -    if e2.respond_to? :each
    -      e2.each {|e3| ary.push(e3) }
    -    else
    -      ary.push(e2)
    -    end
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #grep(pattern, &block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each element which is yield by each and which return value was true when invoking === with pattern. Return an array with all elements or the respective block values.

    - -

    ISO 15.3.2.2.9

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -
    -
    # File 'mrblib/enum.rb', line 149
    -
    -def grep(pattern, &block)
    -  ary = []
    -  self.each{|*val|
    -    sv = val.__svalue
    -    if pattern === sv
    -      ary.push((block)? block.call(*val): sv)
    -    end
    -  }
    -  ary
    -end
    -
    -
    - -
    -

    - - #grep_v(pattern, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -832
    -833
    -834
    -835
    -836
    -837
    -838
    -839
    -840
    -841
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 832
    -
    -def grep_v(pattern, &block)
    -  ary = []
    -  self.each{|*val|
    -    sv = val.__svalue
    -    unless pattern === sv
    -      ary.push((block)? block.call(*val): sv)
    -    end
    -  }
    -  ary
    -end
    -
    -
    - -
    -

    - - #group_by(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.group_by {| obj | block } -> a_hash enum.group_by -> an_enumerator

    - -

    Returns a hash, which keys are evaluated result from the block, and values are arrays of elements in enum corresponding to the key.

    - -
    (1..6).group_by {|i| i%3}   #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -171
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 171
    -
    -def group_by(&block)
    -  return to_enum :group_by unless block
    -
    -  h = {}
    -  self.each do |*val|
    -    key = block.call(*val)
    -    sv = val.__svalue
    -    h.key?(key) ? (h[key] << sv) : (h[key] = [sv])
    -  end
    -  h
    -end
    -
    -
    - -
    -

    - - #hashObject - - - - - -

    -
    - -

    redefine #hash 15.3.1.3.15

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -344
    -345
    -346
    -347
    -348
    -349
    -350
    -351
    -352
    -
    -
    # File 'mrblib/enum.rb', line 344
    -
    -def hash
    -  h = 12347
    -  i = 0
    -  self.each do |e|
    -    h = __update_hash(h, i, e.hash)
    -    i += 1
    -  end
    -  h
    -end
    -
    -
    - -
    -

    - - #include?(obj) ⇒ Boolean - - - - Also known as: - member? - - - - -

    -
    - -

    Return true if at least one element which is yield by each returns a true value by invoking == with obj. Otherwise return false.

    - -

    ISO 15.3.2.2.10

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -167
    -168
    -169
    -170
    -171
    -172
    -
    -
    # File 'mrblib/enum.rb', line 167
    -
    -def include?(obj)
    -  self.each{|*val|
    -    return true if val.__svalue == obj
    -  }
    -  false
    -end
    -
    -
    - -
    -

    - - #inject(*args, &block) ⇒ Object - - - - Also known as: - reduce - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Return value is the sum of all block values. Pass to each block the current sum and the current element.

    - -

    ISO 15.3.2.2.11

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -182
    -183
    -184
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -193
    -194
    -195
    -196
    -197
    -198
    -199
    -200
    -201
    -202
    -203
    -204
    -205
    -206
    -207
    -
    -
    # File 'mrblib/enum.rb', line 182
    -
    -def inject(*args, &block)
    -  raise ArgumentError, "too many arguments" if args.size > 2
    -  if Symbol === args[-1]
    -    sym = args[-1]
    -    block = ->(x,y){x.__send__(sym,y)}
    -    args.pop
    -  end
    -  if args.empty?
    -    flag = true  # no initial argument
    -    result = nil
    -  else
    -    flag = false
    -    result = args[0]
    -  end
    -  self.each{|*val|
    -    val = val.__svalue
    -    if flag
    -      # push first element as initial
    -      flag = false
    -      result = val
    -    else
    -      result = block.call(result, val)
    -    end
    -  }
    -  result
    -end
    -
    -
    - -
    -

    - - #lazyObject - - - - - -

    -
    - -

    = Enumerable#lazy implementation

    - -

    Enumerable#lazy returns an instance of Enumerator::Lazy. You can use it just like as normal Enumerable object, except these methods act as ‘lazy’:

    -
    • -

      map collect

      -
    • -

      select find_all

      -
    • -

      reject

      -
    • -

      grep

      -
    • -

      grep_v

      -
    • -

      drop

      -
    • -

      drop_while

      -
    • -

      take_while

      -
    • -

      flat_map collect_concat

      -
    • -

      zip

      -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -19
    -20
    -21
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 19
    -
    -def lazy
    -  Enumerator::Lazy.new(self)
    -end
    -
    -
    - -
    -

    - - #max(&block) ⇒ Object - - - - - -

    -
    - -

    Return the maximum value of all elements yield by each. If no block is given <=> will be invoked to define this value. If a block is given it will be used instead.

    - -

    ISO 15.3.2.2.13

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -223
    -224
    -225
    -226
    -227
    -228
    -229
    -230
    -231
    -232
    -233
    -234
    -235
    -236
    -237
    -238
    -239
    -240
    -241
    -
    -
    # File 'mrblib/enum.rb', line 223
    -
    -def max(&block)
    -  flag = true  # 1st element?
    -  result = nil
    -  self.each{|*val|
    -    val = val.__svalue
    -    if flag
    -      # 1st element
    -      result = val
    -      flag = false
    -    else
    -      if block
    -        result = val if block.call(val, result) > 0
    -      else
    -        result = val if (val <=> result) > 0
    -      end
    -    end
    -  }
    -  result
    -end
    -
    -
    - -
    -

    - - #max_by(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.max_by {|obj| block } -> obj enum.max_by -> an_enumerator

    - -

    Returns the object in enum that gives the maximum value from the given block.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    %w[albatross dog horse].max_by {|x| x.length } #=> “albatross”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -298
    -299
    -300
    -301
    -302
    -303
    -304
    -305
    -306
    -307
    -308
    -309
    -310
    -311
    -312
    -313
    -314
    -315
    -316
    -317
    -318
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 298
    -
    -def max_by(&block)
    -  return to_enum :max_by unless block
    -
    -  first = true
    -  max = nil
    -  max_cmp = nil
    -
    -  self.each do |*val|
    -    if first
    -      max = val.__svalue
    -      max_cmp = block.call(*val)
    -      first = false
    -    else
    -      if (cmp = block.call(*val)) > max_cmp
    -        max = val.__svalue
    -        max_cmp = cmp
    -      end
    -    end
    -  end
    -  max
    -end
    -
    -
    - -
    -

    - - #min(&block) ⇒ Object - - - - - -

    -
    - -

    Return the minimum value of all elements yield by each. If no block is given <=> will be invoked to define this value. If a block is given it will be used instead.

    - -

    ISO 15.3.2.2.14

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -250
    -251
    -252
    -253
    -254
    -255
    -256
    -257
    -258
    -259
    -260
    -261
    -262
    -263
    -264
    -265
    -266
    -267
    -268
    -
    -
    # File 'mrblib/enum.rb', line 250
    -
    -def min(&block)
    -  flag = true  # 1st element?
    -  result = nil
    -  self.each{|*val|
    -    val = val.__svalue
    -    if flag
    -      # 1st element
    -      result = val
    -      flag = false
    -    else
    -      if block
    -        result = val if block.call(val, result) < 0
    -      else
    -        result = val if (val <=> result) < 0
    -      end
    -    end
    -  }
    -  result
    -end
    -
    -
    - -
    -

    - - #min_by(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.min_by {|obj| block } -> obj enum.min_by -> an_enumerator

    - -

    Returns the object in enum that gives the minimum value from the given block.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    %w[albatross dog horse].min_by {|x| x.length } #=> “dog”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -332
    -333
    -334
    -335
    -336
    -337
    -338
    -339
    -340
    -341
    -342
    -343
    -344
    -345
    -346
    -347
    -348
    -349
    -350
    -351
    -352
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 332
    -
    -def min_by(&block)
    -  return to_enum :min_by unless block
    -
    -  first = true
    -  min = nil
    -  min_cmp = nil
    -
    -  self.each do |*val|
    -    if first
    -      min = val.__svalue
    -      min_cmp = block.call(*val)
    -      first = false
    -    else
    -      if (cmp = block.call(*val)) < min_cmp
    -        min = val.__svalue
    -        min_cmp = cmp
    -      end
    -    end
    -  end
    -  min
    -end
    -
    -
    - -
    -

    - - #minmax(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.minmax -> [min, max] enum.minmax { |a, b| block } -> [min, max]

    - -

    Returns two elements array which contains the minimum and the maximum value in the enumerable. The first form assumes all objects implement Comparable; the second uses the block to return a <=> b.

    - -
    a = %w(albatross dog horse)
    -a.minmax                                  #=> ["albatross", "horse"]
    -a.minmax { |a, b| a.length <=> b.length } #=> ["dog", "albatross"]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -368
    -369
    -370
    -371
    -372
    -373
    -374
    -375
    -376
    -377
    -378
    -379
    -380
    -381
    -382
    -383
    -384
    -385
    -386
    -387
    -388
    -389
    -390
    -391
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 368
    -
    -def minmax(&block)
    -  max = nil
    -  min = nil
    -  first = true
    -
    -  self.each do |*val|
    -    if first
    -      val = val.__svalue
    -      max = val
    -      min = val
    -      first = false
    -    else
    -      val = val.__svalue
    -      if block
    -        max = val if block.call(val, max) > 0
    -        min = val if block.call(val, min) < 0
    -      else
    -        max = val if (val <=> max) > 0
    -        min = val if (val <=> min) < 0
    -      end
    -    end
    -  end
    -  [min, max]
    -end
    -
    -
    - -
    -

    - - #minmax_by(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.minmax_by { |obj| block } -> [min, max] enum.minmax_by -> an_enumerator

    - -

    Returns a two element array containing the objects in enum that correspond to the minimum and maximum values respectively from the given block.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    %w(albatross dog horse).minmax_by { |x| x.length }   #=> ["dog", "albatross"]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -406
    -407
    -408
    -409
    -410
    -411
    -412
    -413
    -414
    -415
    -416
    -417
    -418
    -419
    -420
    -421
    -422
    -423
    -424
    -425
    -426
    -427
    -428
    -429
    -430
    -431
    -432
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 406
    -
    -def minmax_by(&block)
    -  return to_enum :minmax_by unless block
    -
    -  max = nil
    -  max_cmp = nil
    -  min = nil
    -  min_cmp = nil
    -  first = true
    -
    -  self.each do |*val|
    -    if first
    -      max = min = val.__svalue
    -      max_cmp = min_cmp = block.call(*val)
    -      first = false
    -    else
    -      if (cmp = block.call(*val)) > max_cmp
    -        max = val.__svalue
    -        max_cmp = cmp
    -      end
    -      if (cmp = block.call(*val)) < min_cmp
    -        min = val.__svalue
    -        min_cmp = cmp
    -      end
    -    end
    -  end
    -  [min, max]
    -end
    -
    -
    - -
    -

    - - #none?(pat = NONE, &block) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: enum.none? [{ |obj| block }] -> true or false enum.none?(pattern) -> true or false

    - -

    Passes each element of the collection to the given block. The method returns true if the block never returns true for all elements. If the block is not given, none? will return true only if none of the collection members is true.

    - -

    If a pattern is supplied instead, the method returns whether pattern === element for none of the collection members.

    - -
    %w(ant bear cat).none? { |word| word.length == 5 } #=> true
    -%w(ant bear cat).none? { |word| word.length >= 4 } #=> false
    -%w{ant bear cat}.none?(/d/)                        #=> true
    -[1, 3.14, 42].none?(Float)                         #=> false
    -[].none?                                           #=> true
    -[nil, false].none?                                 #=> true
    -[nil, true].none?                                  #=> false
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -455
    -456
    -457
    -458
    -459
    -460
    -461
    -462
    -463
    -464
    -465
    -466
    -467
    -468
    -469
    -470
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 455
    -
    -def none?(pat=NONE, &block)
    -  if !NONE.equal?(pat)
    -    self.each do |*val|
    -      return false if pat === val.__svalue
    -    end
    -  elsif block
    -    self.each do |*val|
    -      return false if block.call(*val)
    -    end
    -  else
    -    self.each do |*val|
    -      return false if val.__svalue
    -    end
    -  end
    -  true
    -end
    -
    -
    - -
    -

    - - #one?(pat = NONE, &block) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: enum.one? [{ |obj| block }] -> true or false enum.one?(pattern) -> true or false

    - -

    Passes each element of the collection to the given block. The method returns true if the block returns true exactly once. If the block is not given, one? will return true only if exactly one of the collection members is true.

    - -

    If a pattern is supplied instead, the method returns whether pattern === element for exactly one collection member.

    - -

    %w(ant bear cat).one? { |word| word.length == 4 } #=> true %w(ant bear cat).one? { |word| word.length > 4 } #=> false %w(ant bear cat).one? { |word| word.length < 4 } #=> false %wbear cat.one?(/t/) #=> false [nil, true, 99].one? #=> false [nil, true, false].one? #=> true [ nil, true, 99 ].one?(Integer) #=> true [].one? #=> false

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -495
    -496
    -497
    -498
    -499
    -500
    -501
    -502
    -503
    -504
    -505
    -506
    -507
    -508
    -509
    -510
    -511
    -512
    -513
    -514
    -515
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 495
    -
    -def one?(pat=NONE, &block)
    -  count = 0
    -  if !NONE.equal?(pat)
    -    self.each do |*val|
    -      count += 1 if pat === val.__svalue
    -      return false if count > 1
    -    end
    -  elsif block
    -    self.each do |*val|
    -      count += 1 if block.call(*val)
    -      return false if count > 1
    -    end
    -  else
    -    self.each do |*val|
    -      count += 1 if val.__svalue
    -      return false if count > 1
    -    end
    -  end
    -
    -  count == 1 ? true : false
    -end
    -
    -
    - -
    -

    - - #partition(&block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Return an array which contains two arrays. The first array contains all elements whose block value was true. The second array contains all elements whose block value was false.

    - -

    ISO 15.3.2.2.16

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -286
    -287
    -288
    -289
    -290
    -291
    -292
    -293
    -294
    -295
    -296
    -297
    -298
    -299
    -
    -
    # File 'mrblib/enum.rb', line 286
    -
    -def partition(&block)
    -  return to_enum :partition unless block
    -
    -  ary_T = []
    -  ary_F = []
    -  self.each{|*val|
    -    if block.call(*val)
    -      ary_T.push(val.__svalue)
    -    else
    -      ary_F.push(val.__svalue)
    -    end
    -  }
    -  [ary_T, ary_F]
    -end
    -
    -
    - -
    -

    - - #reject(&block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each element which is yield by each. Return an array which contains only the elements whose block value was false.

    - -

    ISO 15.3.2.2.17

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -308
    -309
    -310
    -311
    -312
    -313
    -314
    -315
    -316
    -
    -
    # File 'mrblib/enum.rb', line 308
    -
    -def reject(&block)
    -  return to_enum :reject unless block
    -
    -  ary = []
    -  self.each{|*val|
    -    ary.push(val.__svalue) unless block.call(*val)
    -  }
    -  ary
    -end
    -
    -
    - -
    -

    - - #reverse_each(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.reverse_each { |item| block } -> enum enum.reverse_each -> an_enumerator

    - -

    Builds a temporary array and traverses that array in reverse order.

    - -

    If no block is given, an enumerator is returned instead.

    - -
     (1..3).reverse_each { |v| p v }
    -
    - -

    produces:

    - -
     3
    - 2
    - 1
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -621
    -622
    -623
    -624
    -625
    -626
    -627
    -628
    -629
    -630
    -631
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 621
    -
    -def reverse_each(&block)
    -  return to_enum :reverse_each unless block
    -
    -  ary = self.to_a
    -  i = ary.size - 1
    -  while i>=0
    -    block.call(ary[i])
    -    i -= 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #sort(&block) ⇒ Object - - - - - -

    -
    - -

    Return a sorted array of all elements which are yield by each. If no block is given <=> will be invoked on each element to define the order. Otherwise the given block will be used for sorting.

    - -

    ISO 15.3.2.2.19

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -333
    -334
    -335
    -
    -
    # File 'mrblib/enum.rb', line 333
    -
    -def sort(&block)
    -  self.map{|*val| val.__svalue}.sort(&block)
    -end
    -
    -
    - -
    -

    - - #sort_by(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.sort_by { |obj| block } -> array enum.sort_by -> an_enumerator

    - -

    Sorts enum using a set of keys generated by mapping the values in enum through the given block.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -192
    -193
    -194
    -195
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 192
    -
    -def sort_by(&block)
    -  return to_enum :sort_by unless block
    -  self.to_a.sort_by(&block)
    -end
    -
    -
    - -
    -

    - - #sum(init = 0, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.sum(count=1) -> numeric enum.sum(count=1)… -> numeric

    - -

    Returns the sum of elements. For example, [e1, e2, e3].sum returns e1 + e2 + e3. If a block is given, each element is processed by the block, e.g [e1, e2, e3].sumEnumerable._1_1.m gives e1.m + e2.m + e3.m.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -870
    -871
    -872
    -873
    -874
    -875
    -876
    -877
    -878
    -879
    -880
    -881
    -882
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 870
    -
    -def sum(init=0,&block)
    -  result=init
    -  if block
    -    self.each do |e|
    -      result += block.call(e)
    -    end
    -  else
    -    self.each do |e|
    -      result += e
    -    end
    -  end
    -  result
    -end
    -
    -
    - -
    -

    - - #take(n) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.take(n) -> array

    - -

    Returns first n elements from enum.

    - -

    a = [1, 2, 3, 4, 5, 0] a.take(3) #=> [1, 2, 3]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 58
    -
    -def take(n)
    -  n = n.__to_int
    -  i = n.to_i
    -  raise ArgumentError, "attempt to take negative size" if i < 0
    -  ary = []
    -  return ary if i == 0
    -  self.each do |*val|
    -    ary << val.__svalue
    -    i -= 1
    -    break if i == 0
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #take_while(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.take_while {|arr| block } -> array enum.take_while -> an_enumerator

    - -

    Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    a = [1, 2, 3, 4, 5, 0]
    -a.take_while {|i| i < 3 }   #=> [1, 2]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -85
    -86
    -87
    -88
    -89
    -90
    -91
    -92
    -93
    -94
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 85
    -
    -def take_while(&block)
    -  return to_enum :take_while unless block
    -
    -  ary = []
    -  self.each do |*val|
    -    return ary unless block.call(*val)
    -    ary << val.__svalue
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #tallyObject - - - - - -

    -
    - -

    call-seq: enum.tally -> a_hash

    - -

    Tallys the collection. Returns a hash where the keys are the elements and the values are numbers of elements in the collection that correspond to the key.

    - -

    [“a”, “b”, “c”, “b”].tally #=> “b”=>2, “c”=>1

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -852
    -853
    -854
    -855
    -856
    -857
    -858
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 852
    -
    -def tally
    -  hash = {}
    -  self.each do |x|
    -    hash[x] = (hash[x]||0)+1
    -  end
    -  hash
    -end
    -
    -
    - -
    -

    - - #to_h(&blk) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.to_h -> hash

    - -

    Returns the result of interpreting enum as a list of [key, value] pairs.

    - -
    %i[hello world].each_with_index.to_h
    -  # => {:hello => 0, :world => 1}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -783
    -784
    -785
    -786
    -787
    -788
    -789
    -790
    -791
    -792
    -793
    -794
    -795
    -796
    -797
    -798
    -799
    -800
    -801
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 783
    -
    -def to_h(&blk)
    -  h = {}
    -  if blk
    -    self.each do |v|
    -      v = blk.call(v)
    -      raise TypeError, "wrong element type #{v.class} (expected Array)" unless v.is_a? Array
    -      raise ArgumentError, "element has wrong array length (expected 2, was #{v.size})" if v.size != 2
    -      h[v[0]] = v[1]
    -    end
    -  else
    -    self.each do |*v|
    -      v = v.__svalue
    -      raise TypeError, "wrong element type #{v.class} (expected Array)" unless v.is_a? Array
    -      raise ArgumentError, "element has wrong array length (expected 2, was #{v.size})" if v.size != 2
    -      h[v[0]] = v[1]
    -    end
    -  end
    -  h
    -end
    -
    -
    - -
    -

    - - #uniq(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -803
    -804
    -805
    -806
    -807
    -808
    -809
    -810
    -811
    -812
    -813
    -814
    -815
    -816
    -817
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 803
    -
    -def uniq(&block)
    -  hash = {}
    -  if block
    -    self.each do|*v|
    -      v = v.__svalue
    -      hash[block.call(v)] ||= v
    -    end
    -  else
    -    self.each do|*v|
    -      v = v.__svalue
    -      hash[v] ||= v
    -    end
    -  end
    -  hash.values
    -end
    -
    -
    - -
    -

    - - #zip(*args, &block) ⇒ Object - - - - - -

    -
    - -

    use Enumerator to use infinite sequence

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -744
    -745
    -746
    -747
    -748
    -749
    -750
    -751
    -752
    -753
    -754
    -755
    -756
    -757
    -758
    -759
    -760
    -761
    -762
    -763
    -764
    -765
    -766
    -767
    -768
    -769
    -770
    -
    -
    # File 'mrbgems/mruby-enum-ext/mrblib/enum.rb', line 744
    -
    -def zip(*arg, &block)
    -  result = block ? nil : []
    -  arg = arg.map do |a|
    -    unless a.respond_to?(:to_a)
    -      raise TypeError, "wrong argument type #{a.class} (must respond to :to_a)"
    -    end
    -    a.to_a
    -  end
    -
    -  i = 0
    -  self.each do |*val|
    -    a = []
    -    a.push(val.__svalue)
    -    idx = 0
    -    while idx < arg.size
    -      a.push(arg[idx][i])
    -      idx += 1
    -    end
    -    i += 1
    -    if result.nil?
    -      block.call(a)
    -    else
    -      result.push(a)
    -    end
    -  end
    -  result
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerator.html b/docs/api/Enumerator.html deleted file mode 100644 index da756cc..0000000 --- a/docs/api/Enumerator.html +++ /dev/null @@ -1,1754 +0,0 @@ - - - - - - - Class: Enumerator - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Enumerator - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-enumerator/mrblib/enumerator.rb,
    - mrbgems/mruby-enum-lazy/mrblib/lazy.rb,
    mrbgems/mruby-enum-chain/mrblib/chain.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    A class which allows both internal and external iteration.

    - -

    An Enumerator can be created by the following methods. - Kernel#to_enum - Kernel#enum_for - Enumerator.new

    - -

    Most methods have two forms: a block form where the contents are evaluated for each item in the enumeration, and a non-block form which returns a new Enumerator wrapping the iteration.

    - -
      enumerator = %w(one two three).each
    -  puts enumerator.class # => Enumerator
    -
    -  enumerator.each_with_object("foo") do |item, obj|
    -    puts "#{obj}: #{item}"
    -  end
    -
    -  # foo: one
    -  # foo: two
    -  # foo: three
    -
    -  enum_with_obj = enumerator.each_with_object("foo")
    -  puts enum_with_obj.class # => Enumerator
    -
    -  enum_with_obj.each do |item, obj|
    -    puts "#{obj}: #{item}"
    -  end
    -
    -  # foo: one
    -  # foo: two
    -  # foo: three
    -
    - -

    This allows you to chain Enumerators together. For example, you can map a list’s elements to strings containing the index and the element as a string via:

    - -
      puts %w[foo bar baz].map.with_index { |w, i| "#{i}:#{w}" }
    -  # => ["0:foo", "1:bar", "2:baz"]
    -
    - -

    An Enumerator can also be used as an external iterator. For example, Enumerator#next returns the next value of the iterator or raises StopIteration if the Enumerator is at the end.

    - -
      e = [1,2,3].each   # returns an enumerator object.
    -  puts e.next   # => 1
    -  puts e.next   # => 2
    -  puts e.next   # => 3
    -  puts e.next   # raises StopIteration
    -
    - -

    You can use this to implement an internal iterator as follows:

    - -
      def ext_each(e)
    -    while true
    -      begin
    -        vs = e.next_values
    -      rescue StopIteration
    -        return $!.result
    -      end
    -      y = yield(*vs)
    -      e.feed y
    -    end
    -  end
    -
    -  o = Object.new
    -
    -  def o.each
    -    puts yield
    -    puts yield(1)
    -    puts yield(1, 2)
    -    3
    -  end
    -
    -  # use o.each as an internal iterator directly.
    -  puts o.each {|*x| puts x; [:b, *x] }
    -  # => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3
    -
    -  # convert o.each to an external iterator for
    -  # implementing an internal iterator.
    -  puts ext_each(o.to_enum) {|*x| puts x; [:b, *x] }
    -  # => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3
    -
    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    Lazy

    -
    -

    Defined Under Namespace

    -

    - - - - - Classes: Chain, Generator, Lazy, Yielder - - -

    - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(obj, method = :each, *args, **kwd) ⇒ Enumerator - - - - - -

    -
    - -

    Creates a new Enumerator object, which can be used as an Enumerable.

    - -

    In the first form, iteration is defined by the given block, in which a “yielder” object, given as block parameter, can be used to yield a value by calling the yield method (aliased as +<<+):

    - -
    fib = Enumerator.new do |y|
    -  a = b = 1
    -  loop do
    -    y << a
    -    a, b = b, a + b
    -  end
    -end
    -
    -p fib.take(10) # => [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
    -
    - -

    In the second, deprecated, form, a generated Enumerator iterates over the given object using the given method with the given arguments passed. This form is left only for internal use.

    - -

    Use of this form is discouraged. Use Kernel#enum_for or Kernel#to_enum instead.

    - - -
    -
    -
    - - - - -
    - - - - - - -
    -
    -
    -
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 117
    -
    -def initialize(obj=NONE, meth=:each, *args, **kwd, &block)
    -  if block
    -    obj = Generator.new(&block)
    -  elsif NONE.equal?(obj)
    -    raise ArgumentError, "wrong number of arguments (given 0, expected 1+)"
    -  end
    -
    -  @obj = obj
    -  @meth = meth
    -  @args = args
    -  @kwd = kwd
    -  @fib = nil
    -  @dst = nil
    -  @lookahead = nil
    -  @feedvalue = nil
    -  @stop_exc = false
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .produce(init = NONE, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: Enumerator.produce(initial = nil) { |val| } -> enumerator

    - -

    Creates an infinite enumerator from any block, just called over and over. Result of the previous iteration is passed to the next one. If initial is provided, it is passed to the first iteration, and becomes the first element of the enumerator; if it is not provided, first iteration receives nil, and its result becomes first element of the iterator.

    - -

    Raising StopIteration from the block stops an iteration.

    - -

    Examples of usage:

    - -

    Enumerator.produce(1, &:succ) # => enumerator of 1, 2, 3, 4, …

    - -

    Enumerator.produce { rand(10) } # => infinite random number sequence

    - -

    ancestors = Enumerator.produce(node) { |prev| node = prev.parent or raise StopIteration } enclosing_section = ancestors.find { |n| n.type == :section }

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -595
    -596
    -597
    -598
    -599
    -600
    -601
    -602
    -603
    -604
    -605
    -606
    -607
    -608
    -609
    -610
    -611
    -612
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 595
    -
    -def Enumerator.produce(init=NONE, &block)
    -  raise ArgumentError, "no block given" if block.nil?
    -  Enumerator.new do |y|
    -    if NONE.equal?(init)
    -      val = nil
    -    else
    -      val = init
    -      y.yield(val)
    -    end
    -    begin
    -      while true
    -        y.yield(val = block.call(val))
    -      end
    -    rescue StopIteration
    -      # do nothing
    -    end
    -  end
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #+(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -12
    -13
    -14
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 12
    -
    -def +(other)
    -  Chain.new(self, other)
    -end
    -
    -
    - -
    -

    - - #each(*argv, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: enum.each { |elm| block } -> obj enum.each -> enum enum.each(appending_args) { |elm| block } -> obj enum.each(appending_args) -> an_enumerator

    - -

    Iterates over the block according to how this Enumerator was constructed. If no block and no arguments are given, returns self.

    - -

    === Examples

    - -

    Array.new(3) #=> [nil, nil, nil] Array.new(3) { |i| i } #=> [0, 1, 2] Array.to_enum(:new, 3).to_a #=> [0, 1, 2] Array.to_enum(:new).each(3).to_a #=> [0, 1, 2]

    - -

    obj = Object.new

    - -

    def obj.each_arg(a, b=:b, *rest) yield a yield b yield rest :method_returned end

    - -

    enum = obj.to_enum :each_arg, :a, :x

    - -

    enum.each.to_a #=> [:a, :x, []] enum.each.equal?(enum) #=> true enum.each { |elm| elm } #=> :method_returned

    - -

    enum.each(:y, :z).to_a #=> [:a, :x, [:y, :z]] enum.each(:y, :z).equal?(enum) #=> false enum.each(:y, :z) { |elm| elm } #=> :method_returned

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -285
    -286
    -287
    -288
    -289
    -290
    -291
    -292
    -293
    -294
    -295
    -296
    -297
    -298
    -299
    -300
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 285
    -
    -def each(*argv, &block)
    -  obj = self
    -  if 0 < argv.length
    -    obj = self.dup
    -    args = obj.instance_eval{@args}
    -    if !args.empty?
    -      args = args.dup
    -      args.concat argv
    -    else
    -      args = argv.dup
    -    end
    -    obj.instance_eval{@args = args}
    -  end
    -  return obj unless block
    -  __enumerator_block_call(&block)
    -end
    -
    -
    - -
    -

    - - #each_with_index(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: e.each_with_index {|(*args), idx| … } e.each_with_index

    - -

    Same as Enumerator#with_index(0), i.e. there is no starting offset.

    - -

    If no block is given, a new Enumerator is returned that includes the index.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -191
    -192
    -193
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 191
    -
    -def each_with_index(&block)
    -  with_index(0, &block)
    -end
    -
    -
    - -
    -

    - - #feed(value) ⇒ Object - - - - - -

    -
    - -

    call-seq: e.feed obj -> nil

    - -

    Sets the value to be returned by the next yield inside e.

    - -

    If the value is not set, the yield returns nil.

    - -

    This value is cleared after being yielded.

    - -

    # Array#map passes the array’s elements to “yield” and collects the # results of “yield” as an array. # Following example shows that “next” returns the passed elements and # values passed to “feed” are collected as an array which can be # obtained by StopIteration#result. e = [1,2,3].map p e.next #=> 1 e.feed “a” p e.next #=> 2 e.feed “b” p e.next #=> 3 e.feed “c” begin e.next rescue StopIteration p $!.result #=> [“a”, “b”, “c”] end

    - -

    o = Object.new def o.each x = yield # (2) blocks p x # (5) => “foo” x = yield # (6) blocks p x # (8) => nil x = yield # (9) blocks p x # not reached w/o another e.next end

    - -

    e = o.to_enum e.next # (1) e.feed “foo” # (3) e.next # (4) e.next # (7) # (10)

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -535
    -536
    -537
    -538
    -539
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 535
    -
    -def feed(value)
    -  raise TypeError, "feed value already set" if @feedvalue
    -  @feedvalue = value
    -  nil
    -end
    -
    -
    - -
    -

    - - #initialize_copy(obj) ⇒ Object - - - - - -

    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -135
    -136
    -137
    -138
    -139
    -140
    -141
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 135
    -
    -def initialize_copy(obj)
    -  raise TypeError, "can't copy type #{obj.class}" unless obj.kind_of? Enumerator
    -  raise TypeError, "can't copy execution context" if obj.instance_eval{@fib}
    -  meth = args = kwd = fib = nil
    -  obj.instance_eval {
    -    obj = @obj
    -    meth = @meth
    -    args = @args
    -    kwd = @kwd
    -  }
    -  @obj = obj
    -  @meth = meth
    -  @args = args
    -  @kwd = kwd
    -  @fib = nil
    -  @lookahead = nil
    -  @feedvalue = nil
    -  self
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    - - - - -
    -
    -
    -
    -232
    -233
    -234
    -235
    -236
    -237
    -238
    -239
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 232
    -
    -def inspect
    -  if @args && @args.size > 0
    -    args = @args.join(", ")
    -    "#<#{self.class}: #{@obj.inspect}:#{@meth}(#{args})>"
    -  else
    -    "#<#{self.class}: #{@obj.inspect}:#{@meth}>"
    -  end
    -end
    -
    -
    - -
    -

    - - #nextObject - - - - - -

    -
    - -

    call-seq: e.next -> object

    - -

    Returns the next object in the enumerator, and move the internal position forward. When the position reached at the end, StopIteration is raised.

    - -

    === Example

    - -

    a = [1,2,3] e = a.to_enum p e.next #=> 1 p e.next #=> 2 p e.next #=> 3 p e.next #raises StopIteration

    - -

    Note that enumeration sequence by next does not affect other non-external enumeration methods, unless the underlying iteration methods itself has side-effect

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -327
    -328
    -329
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 327
    -
    -def next
    -  next_values.__svalue
    -end
    -
    -
    - -
    -

    - - #next_valuesObject - - - - - -

    -
    - -

    call-seq: e.next_values -> array

    - -

    Returns the next object as an array in the enumerator, and move the internal position forward. When the position reached at the end, StopIteration is raised.

    - -

    This method can be used to distinguish yield and yield nil.

    - -

    === Example

    - -

    o = Object.new def o.each yield yield 1 yield 1, 2 yield nil yield [1, 2] end e = o.to_enum p e.next_values p e.next_values p e.next_values p e.next_values p e.next_values e = o.to_enum p e.next p e.next p e.next p e.next p e.next

    - -

    ## yield args next_values next # yield [] nil # yield 1 [1] 1 # yield 1, 2 [1, 2] [1, 2] # yield nil [nil] nil # yield [1, 2] [[1, 2]] [1, 2]

    - -

    Note that next_values does not affect other non-external enumeration methods unless underlying iteration method itself has side-effect

    - - -
    -
    -
    - -

    Raises:

    -
      - -
    • - - - (@stop_exc) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -375
    -376
    -377
    -378
    -379
    -380
    -381
    -382
    -383
    -384
    -385
    -386
    -387
    -388
    -389
    -390
    -391
    -392
    -393
    -394
    -395
    -396
    -397
    -398
    -399
    -400
    -401
    -402
    -403
    -404
    -405
    -406
    -407
    -408
    -409
    -410
    -411
    -412
    -413
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 375
    -
    -def next_values
    -  if @lookahead
    -    vs = @lookahead
    -    @lookahead = nil
    -    return vs
    -  end
    -  raise @stop_exc if @stop_exc
    -
    -  curr = Fiber.current
    -
    -  if !@fib || !@fib.alive?
    -    @dst = curr
    -    @fib = Fiber.new do
    -      result = each do |*args|
    -        feedvalue = nil
    -        Fiber.yield args
    -        if @feedvalue
    -          feedvalue = @feedvalue
    -          @feedvalue = nil
    -        end
    -        feedvalue
    -      end
    -      @stop_exc = StopIteration.new "iteration reached an end"
    -      @stop_exc.result = result
    -      Fiber.yield nil
    -    end
    -    @lookahead = nil
    -  end
    -
    -  vs = @fib.resume curr
    -  if @stop_exc
    -    @fib = nil
    -    @dst = nil
    -    @lookahead = nil
    -    @feedvalue = nil
    -    raise @stop_exc
    -  end
    -  vs
    -end
    -
    -
    - -
    -

    - - #peekObject - - - - - -

    -
    - -

    call-seq: e.peek -> object

    - -

    Returns the next object in the enumerator, but doesn’t move the internal position forward. If the position is already at the end, StopIteration is raised.

    - -

    === Example

    - -

    a = [1,2,3] e = a.to_enum p e.next #=> 1 p e.peek #=> 2 p e.peek #=> 2 p e.peek #=> 2 p e.next #=> 2 p e.next #=> 3 p e.next #raises StopIteration

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -435
    -436
    -437
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 435
    -
    -def peek
    -  peek_values.__svalue
    -end
    -
    -
    - -
    -

    - - #peek_valuesObject - - - - - -

    -
    - -

    call-seq: e.peek_values -> array

    - -

    Returns the next object as an array, similar to Enumerator#next_values, but doesn’t move the internal position forward. If the position is already at the end, StopIteration is raised.

    - -

    === Example

    - -

    o = Object.new def o.each yield yield 1 yield 1, 2 end e = o.to_enum p e.peek_values #=> [] e.next p e.peek_values #=> [1] p e.peek_values #=> [1] e.next p e.peek_values #=> [1, 2] e.next p e.peek_values # raises StopIteration

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -465
    -466
    -467
    -468
    -469
    -470
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 465
    -
    -def peek_values
    -  if @lookahead.nil?
    -    @lookahead = next_values
    -  end
    -  @lookahead.dup
    -end
    -
    -
    - -
    -

    - - #rewindObject - - - - - -

    -
    - -

    call-seq: e.rewind -> e

    - -

    Rewinds the enumeration sequence to the beginning.

    - -

    If the enclosed object responds to a “rewind” method, it is called.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -480
    -481
    -482
    -483
    -484
    -485
    -486
    -487
    -488
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 480
    -
    -def rewind
    -  @obj.rewind if @obj.respond_to? :rewind
    -  @fib = nil
    -  @dst = nil
    -  @lookahead = nil
    -  @feedvalue = nil
    -  @stop_exc = false
    -  self
    -end
    -
    -
    - -
    -

    - - #sizeObject - - - - - -

    - - - - -
    -
    -
    -
    -241
    -242
    -243
    -244
    -245
    -246
    -247
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 241
    -
    -def size
    -  if @size
    -    @size
    -  elsif @obj.respond_to?(:size)
    -    @obj.size
    -  end
    -end
    -
    -
    - -
    -

    - - #with_index(offset = 0, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: e.with_index(offset = 0) {|(*args), idx| … } e.with_index(offset = 0)

    - -

    Iterates the given block for each element with an index, which starts from offset. If no block is given, returns a new Enumerator that includes the index, starting from offset

    - -

    offset:: the starting index to use

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 166
    -
    -def with_index(offset=0, &block)
    -  return to_enum :with_index, offset unless block
    -
    -  if offset.nil?
    -    offset = 0
    -  else
    -    offset = offset.__to_int
    -  end
    -
    -  n = offset - 1
    -  __enumerator_block_call do |*i|
    -    n += 1
    -    block.call i.__svalue, n
    -  end
    -end
    -
    -
    - -
    -

    - - #with_object(object, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: e.each_with_object(obj) {|(args), obj| … } e.each_with_object(obj) e.with_object(obj) {|(args), obj| … } e.with_object(obj)

    - -

    Iterates the given block for each element with an arbitrary object, obj, and returns obj

    - -

    If no block is given, returns a new Enumerator.

    - - -
    -
    -
    - -
    -

    Examples:

    - - -
    to_three = Enumerator.new do |y|
    -  3.times do |x|
    -    y << x
    -  end
    -end
    -
    -to_three_with_string = to_three.with_object("foo")
    -to_three_with_string.each do |x,string|
    -  puts "#{string}: #{x}"
    -end
    -
    -# => foo:0
    -# => foo:1
    -# => foo:2
    - -
    - - -
    - - - - - - -
    -
    -
    -
    -223
    -224
    -225
    -226
    -227
    -228
    -229
    -230
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 223
    -
    -def with_object(object, &block)
    -  return to_enum(:with_object, object) unless block
    -
    -  __enumerator_block_call do |i|
    -    block.call [i,object]
    -  end
    -  object
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerator/Chain.html b/docs/api/Enumerator/Chain.html deleted file mode 100644 index 09b49f2..0000000 --- a/docs/api/Enumerator/Chain.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - Class: Enumerator::Chain - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Enumerator::Chain - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-enum-chain/mrblib/chain.rb
    -
    - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(*args) ⇒ Chain - - - - - -

    -
    - -

    Returns a new instance of Chain.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -19
    -20
    -21
    -22
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 19
    -
    -def initialize(*args)
    -  @enums = args.freeze
    -  @pos = -1
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #+(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -54
    -55
    -56
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 54
    -
    -def +(other)
    -  self.class.new(self, other)
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 24
    -
    -def each(&block)
    -  return to_enum unless block
    -
    -  i = 0
    -  while i < @enums.size
    -    @pos = i
    -    @enums[i].each(&block)
    -    i += 1
    -  end
    -
    -  self
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    - - - - -
    -
    -
    -
    -58
    -59
    -60
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 58
    -
    -def inspect
    -  "#<#{self.class}: #{@enums.inspect}>"
    -end
    -
    -
    - -
    -

    - - #rewindObject - - - - - -

    - - - - -
    -
    -
    -
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 44
    -
    -def rewind
    -  while 0 <= @pos && @pos < @enums.size
    -    e = @enums[@pos]
    -    e.rewind if e.respond_to?(:rewind)
    -    @pos -= 1
    -  end
    -
    -  self
    -end
    -
    -
    - -
    -

    - - #sizeObject - - - - - -

    - - - - -
    -
    -
    -
    -37
    -38
    -39
    -40
    -41
    -42
    -
    -
    # File 'mrbgems/mruby-enum-chain/mrblib/chain.rb', line 37
    -
    -def size
    -  @enums.reduce(0) do |a, e|
    -    return nil unless e.respond_to?(:size)
    -    a + e.size
    -  end
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerator/Generator.html b/docs/api/Enumerator/Generator.html deleted file mode 100644 index 8428fff..0000000 --- a/docs/api/Enumerator/Generator.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Class: Enumerator::Generator - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Enumerator::Generator - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-enumerator/mrblib/enumerator.rb
    -
    - -
    - -

    Overview

    -
    - -

    just for internal

    - - -
    -
    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(&block) ⇒ Generator - - - - - -

    -
    - -

    Returns a new instance of Generator.

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -544
    -545
    -546
    -547
    -548
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 544
    -
    -def initialize(&block)
    -  raise TypeError, "wrong argument type #{self.class} (expected Proc)" unless block.kind_of? Proc
    -
    -  @proc = block
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #each(*args, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -550
    -551
    -552
    -553
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 550
    -
    -def each(*args, &block)
    -  args.unshift Yielder.new(&block)
    -  @proc.call(*args)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerator/Lazy.html b/docs/api/Enumerator/Lazy.html deleted file mode 100644 index 718343c..0000000 --- a/docs/api/Enumerator/Lazy.html +++ /dev/null @@ -1,1154 +0,0 @@ - - - - - - - Class: Enumerator::Lazy - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Enumerator::Lazy - - - -

    -
    - -
    -
    Inherits:
    -
    - Enumerator - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-enum-lazy/mrblib/lazy.rb
    -
    - -
    - -

    Overview

    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from Enumerator

    -

    #+, #each, #each_with_index, #feed, #initialize_copy, #inspect, #next, #next_values, #peek, #peek_values, produce, #rewind, #size, #with_index, #with_object

    - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #count, #cycle, #detect, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_index, #first, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reverse_each, #sort, #sort_by, #sum, #tally, #to_h

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(obj, &block) ⇒ Lazy - - - - - -

    -
    - -

    Returns a new instance of Lazy.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 31
    -
    -def initialize(obj, &block)
    -  super(){|yielder|
    -    begin
    -      obj.each{|x|
    -        if block
    -          block.call(yielder, x)
    -        else
    -          yielder << x
    -        end
    -      }
    -    rescue StopIteration
    -    end
    -  }
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #drop(n) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -101
    -102
    -103
    -104
    -105
    -106
    -107
    -108
    -109
    -110
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 101
    -
    -def drop(n)
    -  dropped = 0
    -  Lazy.new(self){|yielder, val|
    -    if dropped < n
    -      dropped += 1
    -    else
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #drop_while(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -112
    -113
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -124
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 112
    -
    -def drop_while(&block)
    -  dropping = true
    -  Lazy.new(self){|yielder, val|
    -    if dropping
    -      if not block.call(val)
    -        yielder << val
    -        dropping = false
    -      end
    -    else
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #flat_map(&block) ⇒ Object - - - - Also known as: - collect_concat - - - - -

    - - - - -
    -
    -
    -
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 150
    -
    -def flat_map(&block)
    -  Lazy.new(self){|yielder, val|
    -    ary = block.call(val)
    -    # TODO: check ary is an Array
    -    ary.each{|x|
    -      yielder << x
    -    }
    -  }
    -end
    -
    -
    - -
    -

    - - #grep(pattern) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -85
    -86
    -87
    -88
    -89
    -90
    -91
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 85
    -
    -def grep(pattern)
    -  Lazy.new(self){|yielder, val|
    -    if pattern === val
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #grep_v(pattern) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -93
    -94
    -95
    -96
    -97
    -98
    -99
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 93
    -
    -def grep_v(pattern)
    -  Lazy.new(self){|yielder, val|
    -    unless pattern === val
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #map(&block) ⇒ Object - - - - Also known as: - collect - - - - -

    - - - - -
    -
    -
    -
    -61
    -62
    -63
    -64
    -65
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 61
    -
    -def map(&block)
    -  Lazy.new(self){|yielder, val|
    -    yielder << block.call(val)
    -  }
    -end
    -
    -
    - -
    -

    - - #reject(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 77
    -
    -def reject(&block)
    -  Lazy.new(self){|yielder, val|
    -    unless block.call(val)
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #select(&block) ⇒ Object - - - - Also known as: - find_all - - - - -

    - - - - -
    -
    -
    -
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 68
    -
    -def select(&block)
    -  Lazy.new(self){|yielder, val|
    -    if block.call(val)
    -      yielder << val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #take(n) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -134
    -135
    -136
    -137
    -138
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 126
    -
    -def take(n)
    -  if n == 0
    -    return Lazy.new(self){raise StopIteration}
    -  end
    -  taken = 0
    -  Lazy.new(self){|yielder, val|
    -    yielder << val
    -    taken += 1
    -    if taken >= n
    -      raise StopIteration
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #take_while(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -140
    -141
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 140
    -
    -def take_while(&block)
    -  Lazy.new(self){|yielder, val|
    -    if block.call(val)
    -      yielder << val
    -    else
    -      raise StopIteration
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #to_enum(meth = :each, *args, &block) ⇒ Object - - - - Also known as: - enum_for - - - - -

    - - - - -
    -
    -
    -
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 46
    -
    -def to_enum(meth=:each, *args, &block)
    -  unless self.respond_to?(meth)
    -    raise ArgumentError, "undefined method #{meth}"
    -  end
    -  lz = Lazy.new(self, &block)
    -  obj = self
    -  lz.instance_eval {
    -    @obj = obj
    -    @meth = meth
    -    @args = args
    -  }
    -  lz
    -end
    -
    -
    - -
    -

    - - #uniq(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -182
    -183
    -184
    -185
    -186
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 173
    -
    -def uniq(&block)
    -  hash = {}
    -  Lazy.new(self){|yielder, val|
    -    if block
    -      v = block.call(val)
    -    else
    -      v = val
    -    end
    -    unless hash.include?(v)
    -      yielder << val
    -      hash[v] = val
    -    end
    -  }
    -end
    -
    -
    - -
    -

    - - #zip(*args, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -161
    -162
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -
    -
    # File 'mrbgems/mruby-enum-lazy/mrblib/lazy.rb', line 161
    -
    -def zip(*args, &block)
    -  enums = [self] + args
    -  Lazy.new(self){|yielder, val|
    -    ary = enums.map{|e| e.next}
    -    if block
    -      yielder << block.call(ary)
    -    else
    -      yielder << ary
    -    end
    -  }
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Enumerator/Yielder.html b/docs/api/Enumerator/Yielder.html deleted file mode 100644 index dd684f5..0000000 --- a/docs/api/Enumerator/Yielder.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - Class: Enumerator::Yielder - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Enumerator::Yielder - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-enumerator/mrblib/enumerator.rb
    -
    - -
    - -

    Overview

    -
    - -

    just for internal

    - - -
    -
    -
    - - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(&block) ⇒ Yielder - - - - - -

    -
    - -

    Returns a new instance of Yielder.

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -558
    -559
    -560
    -561
    -562
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 558
    -
    -def initialize(&block)
    -  raise LocalJumpError, "no block given" unless block
    -
    -  @proc = block
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #<<(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -568
    -569
    -570
    -571
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 568
    -
    -def << *args
    -  self.yield(*args)
    -  self
    -end
    -
    -
    - -
    -

    - - #yield(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -564
    -565
    -566
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 564
    -
    -def yield(*args)
    -  @proc.call(*args)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Errno.html b/docs/api/Errno.html deleted file mode 100644 index 053a1bf..0000000 --- a/docs/api/Errno.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - Module: Errno - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Errno - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-errno/mrblib/errno.rb
    -
    - -
    - - - - - - - - - -

    - Class Method Summary - collapse -

    - - - - - - -
    -

    Class Method Details

    - - -
    -

    - - .const_defined?(name) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-errno/mrblib/errno.rb', line 2
    -
    -def Errno.const_defined?(name)
    -  __errno_defined?(name) or super
    -end
    -
    -
    - -
    -

    - - .const_missing(name) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -6
    -7
    -8
    -
    -
    # File 'mrbgems/mruby-errno/mrblib/errno.rb', line 6
    -
    -def Errno.const_missing(name)
    -  __errno_define(name) or super
    -end
    -
    -
    - -
    -

    - - .constantsObject - - - - - -

    -
    - -

    Module#constants is defined in mruby-metaprog So, it may be raised NoMethodError

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -12
    -13
    -14
    -
    -
    # File 'mrbgems/mruby-errno/mrblib/errno.rb', line 12
    -
    -def Errno.constants
    -  __errno_list(super)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Exception.html b/docs/api/Exception.html deleted file mode 100644 index 95162a7..0000000 --- a/docs/api/Exception.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - Exception: Exception - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: Exception - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - -
      - -
    • - - - #message ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: exception.message -> string.

      -
      - -
    • - - -
    - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #messageObject - - - - - -

    -
    - -

    call-seq: exception.message -> string

    - -

    Returns the result of invoking exception.to_s. Normally this returns the exception’s message or name.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -9
    -10
    -11
    -
    -
    # File 'mrblib/10error.rb', line 9
    -
    -def message
    -  to_s
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/File.html b/docs/api/File.html deleted file mode 100644 index e6ddba3..0000000 --- a/docs/api/File.html +++ /dev/null @@ -1,1630 +0,0 @@ - - - - - - - Class: File - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: File - - - -

    -
    - -
    -
    Inherits:
    -
    - IO - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Constants
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-io/mrblib/file.rb,
    - mrbgems/mruby-io/mrblib/file_constants.rb,
    mrbgems/mruby-io/mrblib/file_constants.rb
    -
    -
    - -
    - -

    Defined Under Namespace

    -

    - - - Modules: Constants - - - - -

    - - - -

    Constant Summary

    - -

    Constants included - from Constants

    -

    Constants::FNM_CASEFOLD, Constants::FNM_DOTMATCH, Constants::FNM_NOESCAPE, Constants::FNM_PATHNAME, Constants::FNM_SYSCASE

    - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #path ⇒ Object - - - - - - - - - - - - - - - - -
      -

      Returns the value of attribute path.

      -
      - -
    • - - -
    - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(fd_or_path, mode = "r", perm = 0666) ⇒ File - - - - - -

    -
    - -

    Returns a new instance of File.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -4
    -5
    -6
    -7
    -8
    -9
    -10
    -11
    -12
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 4
    -
    -def initialize(fd_or_path, mode = "r", perm = 0666)
    -  if fd_or_path.kind_of? Integer
    -    super(fd_or_path, mode)
    -  else
    -    @path = fd_or_path
    -    fd = IO.sysopen(@path, mode, perm)
    -    super(fd, mode)
    -  end
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #pathObject - - - - - -

    -
    - -

    Returns the value of attribute path.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 2
    -
    -def path
    -  @path
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .directory?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -87
    -88
    -89
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 87
    -
    -def self.directory?(file)
    -  FileTest.directory?(file)
    -end
    -
    -
    - -
    -

    - - .exist?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -91
    -92
    -93
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 91
    -
    -def self.exist?(file)
    -  FileTest.exist?(file)
    -end
    -
    -
    - -
    -

    - - .exists?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -95
    -96
    -97
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 95
    -
    -def self.exists?(file)
    -  FileTest.exists?(file)
    -end
    -
    -
    - -
    -

    - - .extname(filename) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -127
    -128
    -129
    -130
    -131
    -132
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 127
    -
    -def self.extname(filename)
    -  fname = self.basename(filename)
    -  epos = fname.rindex('.')
    -  return '' if epos == 0 || epos.nil?
    -  return fname[epos..-1]
    -end
    -
    -
    - -
    -

    - - .file?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -99
    -100
    -101
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 99
    -
    -def self.file?(file)
    -  FileTest.file?(file)
    -end
    -
    -
    - -
    -

    - - .foreach(file) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 77
    -
    -def self.foreach(file)
    -  if block_given?
    -    self.open(file) do |f|
    -      f.each {|l| yield l}
    -    end
    -  else
    -    return self.new(file)
    -  end
    -end
    -
    -
    - -
    -

    - - .join(*names) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 33
    -
    -def self.join(*names)
    -  return "" if names.empty?
    -
    -  names.map! do |name|
    -    case name
    -    when String
    -      name
    -    when Array
    -      if names == name
    -        raise ArgumentError, "recursive array"
    -      end
    -      join(*name)
    -    else
    -      raise TypeError, "no implicit conversion of #{name.class} into String"
    -    end
    -  end
    -
    -  return names[0] if names.size == 1
    -
    -  if names[0][-1] == File::SEPARATOR
    -    s = names[0][0..-2]
    -  else
    -    s = names[0].dup
    -  end
    -
    -  (1..names.size-2).each { |i|
    -    t = names[i]
    -    if t[0] == File::SEPARATOR and t[-1] == File::SEPARATOR
    -      t = t[1..-2]
    -    elsif t[0] == File::SEPARATOR
    -      t = t[1..-1]
    -    elsif t[-1] == File::SEPARATOR
    -      t = t[0..-2]
    -    end
    -    s += File::SEPARATOR + t if t != ""
    -  }
    -  if names[-1][0] == File::SEPARATOR
    -    s += File::SEPARATOR + names[-1][1..-1]
    -  else
    -    s += File::SEPARATOR + names[-1]
    -  end
    -  s
    -end
    -
    -
    - -
    -

    - - .path(filename) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -134
    -135
    -136
    -137
    -138
    -139
    -140
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 134
    -
    -def self.path(filename)
    -  if filename.kind_of?(String)
    -    filename
    -  else
    -    raise TypeError, "no implicit conversion of #{filename.class} into String"
    -  end
    -end
    -
    -
    - -
    -

    - - .pipe?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -103
    -104
    -105
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 103
    -
    -def self.pipe?(file)
    -  FileTest.pipe?(file)
    -end
    -
    -
    - -
    -

    - - .size(file) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -107
    -108
    -109
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 107
    -
    -def self.size(file)
    -  FileTest.size(file)
    -end
    -
    -
    - -
    -

    - - .size?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -111
    -112
    -113
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 111
    -
    -def self.size?(file)
    -  FileTest.size?(file)
    -end
    -
    -
    - -
    -

    - - .socket?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -115
    -116
    -117
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 115
    -
    -def self.socket?(file)
    -  FileTest.socket?(file)
    -end
    -
    -
    - -
    -

    - - .symlink?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -119
    -120
    -121
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 119
    -
    -def self.symlink?(file)
    -  FileTest.symlink?(file)
    -end
    -
    -
    - -
    -

    - - .zero?(file) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -123
    -124
    -125
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 123
    -
    -def self.zero?(file)
    -  FileTest.zero?(file)
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #atimeObject - - - - - -

    - - - - -
    -
    -
    -
    -14
    -15
    -16
    -17
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 14
    -
    -def atime
    -  t = self._atime
    -  t && Time.at(t)
    -end
    -
    -
    - -
    -

    - - #ctimeObject - - - - - -

    - - - - -
    -
    -
    -
    -19
    -20
    -21
    -22
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 19
    -
    -def ctime
    -  t = self._ctime
    -  t && Time.at(t)
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    - - - - -
    -
    -
    -
    -29
    -30
    -31
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 29
    -
    -def inspect
    -  "<#{self.class}:#{@path}>"
    -end
    -
    -
    - -
    -

    - - #mtimeObject - - - - - -

    - - - - -
    -
    -
    -
    -24
    -25
    -26
    -27
    -
    -
    # File 'mrbgems/mruby-io/mrblib/file.rb', line 24
    -
    -def mtime
    -  t = self._mtime
    -  t && Time.at(t)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/File/Constants.html b/docs/api/File/Constants.html deleted file mode 100644 index 1410b3a..0000000 --- a/docs/api/File/Constants.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - Module: File::Constants - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: File::Constants - - - -

    -
    - - - - - - - - - -
    -
    Included in:
    -
    File
    -
    - - - -
    -
    Defined in:
    -
    mrbgems/mruby-io/mrblib/file_constants.rb
    -
    - -
    - - - -

    - Constant Summary - collapse -

    - -
    - -
    FNM_SYSCASE = - -
    -
    0
    - -
    FNM_NOESCAPE = - -
    -
    1
    - -
    FNM_PATHNAME = - -
    -
    2
    - -
    FNM_DOTMATCH = - -
    -
    4
    - -
    FNM_CASEFOLD = - -
    -
    8
    - -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Float.html b/docs/api/Float.html deleted file mode 100644 index 5937a5c..0000000 --- a/docs/api/Float.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - Class: Float - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Float - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/numeric.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #step(num = nil, step = 1, &block) ⇒ Object - - - - - -

    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -135
    -136
    -137
    -138
    -139
    -140
    -141
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -
    -
    # File 'mrblib/numeric.rb', line 135
    -
    -def step(num=nil, step=1, &block)
    -  raise ArgumentError, "step can't be 0" if step == 0
    -  return to_enum(:step, num, step) unless block
    -
    -  i = self
    -  if num == self || step.infinite?
    -    block.call(i) if step > 0 && i <= (num||i) || step < 0 && i >= (num||-i)
    -  elsif num == nil
    -    while true
    -      block.call(i)
    -      i += step
    -    end
    -  elsif step > 0
    -    while i <= num
    -      block.call(i)
    -      i += step
    -    end
    -  else
    -    while i >= num
    -      block.call(i)
    -      i += step
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/FloatDomainError.html b/docs/api/FloatDomainError.html deleted file mode 100644 index 8af5ee9..0000000 --- a/docs/api/FloatDomainError.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Exception: FloatDomainError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: FloatDomainError - - - -

    -
    - -
    -
    Inherits:
    -
    - RangeError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/FrozenError.html b/docs/api/FrozenError.html deleted file mode 100644 index 102edb6..0000000 --- a/docs/api/FrozenError.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - Exception: FrozenError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: FrozenError - - - -

    -
    - -
    -
    Inherits:
    -
    - RuntimeError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Hash.html b/docs/api/Hash.html deleted file mode 100644 index 58cf2a2..0000000 --- a/docs/api/Hash.html +++ /dev/null @@ -1,3115 +0,0 @@ - - - - - - - Class: Hash - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Hash - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/hash.rb,
    - mrbgems/mruby-hash-ext/mrblib/hash.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Hash

    - -

    ISO 15.2.13

    - - -
    -
    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Class Method Summary - collapse -

    - -
      - -
    • - - - .[](*object) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: Hash[ key, value, … ] -> new_hash Hash[ [ [key, value], … ] ] -> new_hash Hash[ object ] -> new_hash.

      -
      - -
    • - - -
    - -

    - Instance Method Summary - collapse -

    - -
      - -
    • - - - #<(hash) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash < other -> true or false.

      -
      - -
    • - - -
    • - - - #<=(hash) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash <= other -> true or false.

      -
      - -
    • - - -
    • - - - #==(hash) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash == object -> true or false.

      -
      - -
    • - - -
    • - - - #>(hash) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash > other -> true or false.

      -
      - -
    • - - -
    • - - - #>=(hash) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash >= other -> true or false.

      -
      - -
    • - - -
    • - - - #compact ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.compact -> new_hsh.

      -
      - -
    • - - -
    • - - - #compact! ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.compact! -> hsh.

      -
      - -
    • - - -
    • - - - #delete(key, &block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash.delete(key) -> value or nil hash.delete(key) {|key| … } -> object.

      -
      - -
    • - - -
    • - - - #delete_if(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.delete_if {| key, value | block } -> hsh hsh.delete_if -> an_enumerator.

      -
      - -
    • - - -
    • - - - #dig(idx, *args) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.dig(key,…) -> object.

      -
      - -
    • - - -
    • - - - #each(&block) ⇒ Object - - - - (also: #each_pair) - - - - - - - - - - - -
      -

      call-seq: hsh.each {| key, value | block } -> hsh hsh.each_pair {| key, value | block } -> hsh hsh.each -> an_enumerator hsh.each_pair -> an_enumerator.

      -
      - -
    • - - -
    • - - - #each_key(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.each_key {| key | block } -> hsh hsh.each_key -> an_enumerator.

      -
      - -
    • - - -
    • - - - #each_value(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.each_value {| value | block } -> self hsh.each_value -> an_enumerator.

      -
      - -
    • - - -
    • - - - #eql?(hash) ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: hash.eql? object -> true or false.

      -
      - -
    • - - -
    • - - - #fetch(key, none = NONE, &block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.fetch(key [, default] ) -> obj hsh.fetch(key) {| key | block } -> obj.

      -
      - -
    • - - -
    • - - - #fetch_values(*keys, &block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.fetch_values(key, …) -> array hsh.fetch_values(key, …) { |key| block } -> array.

      -
      - -
    • - - -
    • - - - #flatten(level = 1) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hash.flatten -> an_array hash.flatten(level) -> an_array.

      -
      - -
    • - - -
    • - - - #invert ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.invert -> new_hash.

      -
      - -
    • - - -
    • - - - #keep_if(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.keep_if {| key, value | block } -> hsh hsh.keep_if -> an_enumerator.

      -
      - -
    • - - -
    • - - - #key(val) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.key(value) -> key.

      -
      - -
    • - - -
    • - - - #merge(*others, &block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.merge(other_hash..) -> hsh hsh.merge(other_hash..){|key, oldval, newval| block} -> hsh.

      -
      - -
    • - - -
    • - - - #merge!(*others, &block) ⇒ Object - - - - (also: #update) - - - - - - - - - - - -
      -

      call-seq: hsh.merge!(other_hash..) -> hsh hsh.merge!(other_hash..){|key, oldval, newval| block} -> hsh.

      -
      - -
    • - - -
    • - - - #reject(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.reject {|key, value| block} -> a_hash hsh.reject -> an_enumerator.

      -
      - -
    • - - -
    • - - - #reject!(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.reject! {| key, value | block } -> hsh or nil hsh.reject! -> an_enumerator.

      -
      - -
    • - - -
    • - - - #select(&block) ⇒ Object - - - - (also: #filter) - - - - - - - - - - - -
      -

      call-seq: hsh.select {|key, value| block} -> a_hash hsh.select -> an_enumerator.

      -
      - -
    • - - -
    • - - - #select!(&block) ⇒ Object - - - - (also: #filter!) - - - - - - - - - - - -
      -

      call-seq: hsh.select! {| key, value | block } -> hsh or nil hsh.select! -> an_enumerator.

      -
      - -
    • - - -
    • - - - #to_h ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.to_h -> hsh or new_hash.

      -
      - -
    • - - -
    • - - - #to_proc ⇒ Object - - - - - - - - - - - - - -
      - -
    • - - -
    • - - - #transform_keys(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.transform_keys {|key| block } -> new_hash hsh.transform_keys -> an_enumerator.

      -
      - -
    • - - -
    • - - - #transform_keys!(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.transform_keys! {|key| block } -> hsh hsh.transform_keys! -> an_enumerator.

      -
      - -
    • - - -
    • - - - #transform_values(&b) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.transform_values {|value| block } -> new_hash hsh.transform_values -> an_enumerator.

      -
      - -
    • - - -
    • - - - #transform_values!(&b) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.transform_values! {|key| block } -> hsh hsh.transform_values! -> an_enumerator.

      -
      - -
    • - - -
    - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #uniq, #zip

    - - -
    -

    Class Method Details

    - - -
    -

    - - .[](*object) ⇒ Object - - - - - -

    -
    - -

    call-seq: Hash[ key, value, … ] -> new_hash Hash[ [ [key, value], … ] ] -> new_hash Hash[ object ] -> new_hash

    - -

    Creates a new hash populated with the given objects.

    - -

    Similar to the literal { key => value, ... }. In the first form, keys and values occur in pairs, so there must be an even number of arguments.

    - -

    The second and third form take a single argument which is either an array of key-value pairs or an object convertible to a hash.

    - -
    Hash["a", 100, "b", 200] #=> {"a"=>100, "b"=>200}
    -Hash[ [ ["a", 100], ["b", 200] ] ] #=> {"a"=>100, "b"=>200}
    -Hash["a" => 100, "b" => 200] #=> {"a"=>100, "b"=>200}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 26
    -
    -def self.[](*object)
    -  length = object.length
    -  if length == 1
    -    o = object[0]
    -    if Hash === o
    -      h = self.new
    -      o.each { |k, v| h[k] = v }
    -      return h
    -    elsif o.respond_to?(:to_a)
    -      h = self.new
    -      o.to_a.each do |i|
    -        raise ArgumentError, "wrong element type #{i.class} (expected array)" unless i.respond_to?(:to_a)
    -        k, v = nil
    -        case i.size
    -        when 2
    -          k = i[0]
    -          v = i[1]
    -        when 1
    -          k = i[0]
    -        else
    -          raise ArgumentError, "invalid number of elements (#{i.size} for 1..2)"
    -        end
    -        h[k] = v
    -      end
    -      return h
    -    end
    -  end
    -  unless length % 2 == 0
    -    raise ArgumentError, 'odd number of arguments for Hash'
    -  end
    -  h = self.new
    -  0.step(length - 2, 2) do |i|
    -    h[object[i]] = object[i + 1]
    -  end
    -  h
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #<(hash) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash < other -> true or false

    - -

    Returns true if hash is subset of other.

    - -
    h1 = {a:1, b:2}
    -h2 = {a:1, b:2, c:3}
    -h1 < h2    #=> true
    -h2 < h1    #=> false
    -h1 < h1    #=> false
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -303
    -304
    -305
    -306
    -307
    -308
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 303
    -
    -def <(hash)
    -  raise TypeError, "can't convert #{hash.class} to Hash" unless Hash === hash
    -  size < hash.size and all? {|key, val|
    -    hash.key?(key) and hash[key] == val
    -  }
    -end
    -
    -
    - -
    -

    - - #<=(hash) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash <= other -> true or false

    - -

    Returns true if hash is subset of other or equals to other.

    - -
    h1 = {a:1, b:2}
    -h2 = {a:1, b:2, c:3}
    -h1 <= h2   #=> true
    -h2 <= h1   #=> false
    -h1 <= h1   #=> true
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -323
    -324
    -325
    -326
    -327
    -328
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 323
    -
    -def <=(hash)
    -  raise TypeError, "can't convert #{hash.class} to Hash" unless Hash === hash
    -  size <= hash.size and all? {|key, val|
    -    hash.key?(key) and hash[key] == val
    -  }
    -end
    -
    -
    - -
    -

    - - #==(hash) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash == object -> true or false

    - -

    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 Object#==) the corresponding elements in the other hash.

    - -

    ISO 15.2.13.4.1

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -
    -
    # File 'mrblib/hash.rb', line 22
    -
    -def ==(hash)
    -  return true if self.equal?(hash)
    -  unless Hash === hash
    -    return false
    -  end
    -  return false if self.size != hash.size
    -  self.each do |k,v|
    -    return false unless hash.key?(k)
    -    return false unless self[k] == hash[k]
    -  end
    -  return true
    -end
    -
    -
    - -
    -

    - - #>(hash) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash > other -> true or false

    - -

    Returns true if other is subset of hash.

    - -
    h1 = {a:1, b:2}
    -h2 = {a:1, b:2, c:3}
    -h1 > h2    #=> false
    -h2 > h1    #=> true
    -h1 > h1    #=> false
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -343
    -344
    -345
    -346
    -347
    -348
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 343
    -
    -def >(hash)
    -  raise TypeError, "can't convert #{hash.class} to Hash" unless Hash === hash
    -  size > hash.size and hash.all? {|key, val|
    -    key?(key) and self[key] == val
    -  }
    -end
    -
    -
    - -
    -

    - - #>=(hash) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash >= other -> true or false

    - -

    Returns true if other is subset of hash or equals to hash.

    - -
    h1 = {a:1, b:2}
    -h2 = {a:1, b:2, c:3}
    -h1 >= h2   #=> false
    -h2 >= h1   #=> true
    -h1 >= h1   #=> true
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -363
    -364
    -365
    -366
    -367
    -368
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 363
    -
    -def >=(hash)
    -  raise TypeError, "can't convert #{hash.class} to Hash" unless Hash === hash
    -  size >= hash.size and hash.all? {|key, val|
    -    key?(key) and self[key] == val
    -  }
    -end
    -
    -
    - -
    -

    - - #compactObject - - - - - -

    -
    - -

    call-seq: hsh.compact -> new_hsh

    - -

    Returns a new hash with the nil values/key pairs removed

    - -

    h = { a: 1, b: false, c: nil } h.compact #=> { a: 1, b: false } h #=> { a: 1, b: false, c: nil }

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -129
    -130
    -131
    -132
    -133
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 129
    -
    -def compact
    -  h=self.dup
    -  h.__compact
    -  h
    -end
    -
    -
    - -
    -

    - - #compact!Object - - - - - -

    -
    - -

    call-seq: hsh.compact! -> hsh

    - -

    Removes all nil values from the hash. Returns the hash. Returns nil if the hash does not contain nil values.

    - -

    h = { a: 1, b: false, c: nil } h.compact! #=> { a: 1, b: false }

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -115
    -116
    -117
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 115
    -
    -def compact!
    -  self.__compact
    -end
    -
    -
    - -
    -

    - - #delete(key, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash.delete(key) -> value or nil hash.delete(key) {|key| … } -> object

    - -

    Delete the element with the key key. Return the value of the element if key was found. Return nil if nothing was found. If a block is given, call the block with the value of the element.

    - -

    ISO 15.2.13.4.8

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -67
    -68
    -69
    -70
    -71
    -72
    -
    -
    # File 'mrblib/hash.rb', line 67
    -
    -def delete(key, &block)
    -  if block && !self.has_key?(key)
    -    return block.call(key)
    -  end
    -  self.__delete(key)
    -end
    -
    -
    - -
    -

    - - #delete_if(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.delete_if {| key, value | block } -> hsh hsh.delete_if -> an_enumerator

    - -

    Deletes every key-value pair from hsh for which block evaluates to true.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    h = { "a" => 100, "b" => 200, "c" => 300 }
    -h.delete_if {|key, value| key >= "b" }   #=> {"a"=>100}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -191
    -192
    -193
    -194
    -195
    -196
    -197
    -198
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 191
    -
    -def delete_if(&block)
    -  return to_enum :delete_if unless block
    -
    -  self.each do |k, v|
    -    self.delete(k) if block.call(k, v)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #dig(idx, *args) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.dig(key,…) -> object

    - -

    Extracts the nested value specified by the sequence of key objects by calling dig at each step, returning nil if any intermediate step is nil.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -378
    -379
    -380
    -381
    -382
    -383
    -384
    -385
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 378
    -
    -def dig(idx,*args)
    -  n = self[idx]
    -  if args.size > 0
    -    n&.dig(*args)
    -  else
    -    n
    -  end
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - Also known as: - each_pair - - - - -

    -
    - -

    call-seq: hsh.each {| key, value | block } -> hsh hsh.each_pair {| key, value | block } -> hsh hsh.each -> an_enumerator hsh.each_pair -> an_enumerator

    - -

    Calls the given block for each element of self and pass the key and value of each element.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    h = { "a" => 100, "b" => 200 }
    -h.each {|key, value| puts "#{key} is #{value}" }
    -
    - -

    produces:

    - -

    a is 100 b is 200

    - -

    ISO 15.2.13.4.9

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -95
    -96
    -97
    -98
    -99
    -100
    -101
    -102
    -103
    -104
    -105
    -106
    -107
    -
    -
    # File 'mrblib/hash.rb', line 95
    -
    -def each(&block)
    -  return to_enum :each unless block
    -
    -  keys = self.keys
    -  vals = self.values
    -  len = self.size
    -  i = 0
    -  while i < len
    -    block.call [keys[i], vals[i]]
    -    i += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_key(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.each_key {| key | block } -> hsh hsh.each_key -> an_enumerator

    - -

    Calls the given block for each element of self and pass the key of each element.

    - -

    If no block is given, an enumerator is returned instead.

    - -

    h = { “a” => 100, “b” => 200 } h.each_key {|key| puts key }

    - -

    produces:

    - -

    a b

    - -

    ISO 15.2.13.4.10

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -128
    -129
    -130
    -131
    -132
    -133
    -
    -
    # File 'mrblib/hash.rb', line 128
    -
    -def each_key(&block)
    -  return to_enum :each_key unless block
    -
    -  self.keys.each{|k| block.call(k)}
    -  self
    -end
    -
    -
    - -
    -

    - - #each_value(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.each_value {| value | block } -> self hsh.each_value -> an_enumerator

    - -

    Calls the given block with each value; returns self:

    - -

    If no block is given, an enumerator is returned instead.

    - -

    h = { “a” => 100, “b” => 200 } h.each_value {|value| puts value }

    - -

    produces:

    - -

    100 200

    - -

    ISO 15.2.13.4.11

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -153
    -154
    -155
    -156
    -157
    -158
    -
    -
    # File 'mrblib/hash.rb', line 153
    -
    -def each_value(&block)
    -  return to_enum :each_value unless block
    -
    -  self.values.each{|v| block.call(v)}
    -  self
    -end
    -
    -
    - -
    -

    - - #eql?(hash) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: hash.eql? object -> true or false

    - -

    Returns true if hash and other are both hashes with the same content compared by eql?.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -42
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -
    -
    # File 'mrblib/hash.rb', line 42
    -
    -def eql?(hash)
    -  return true if self.equal?(hash)
    -  unless Hash === hash
    -    return false
    -  end
    -  return false if self.size != hash.size
    -  self.each do |k,v|
    -    return false unless hash.key?(k)
    -    return false unless self[k].eql?(hash[k])
    -  end
    -  return true
    -end
    -
    -
    - -
    -

    - - #fetch(key, none = NONE, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.fetch(key [, default] ) -> obj hsh.fetch(key) {| key | block } -> obj

    - -

    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 KeyError exception; if default is given, then that will be returned; if the optional code block is specified, then that will be run and its result returned.

    - -
    h = { "a" => 100, "b" => 200 }
    -h.fetch("a")                            #=> 100
    -h.fetch("z", "go fish")                 #=> "go fish"
    -h.fetch("z") { |el| "go fish, #{el}"}   #=> "go fish, z"
    -
    - -

    The following example shows that an exception is raised if the key is not found and a default value is not supplied.

    - -
    h = { "a" => 100, "b" => 200 }
    -h.fetch("z")
    -
    - -

    produces:

    - -
    prog.rb:2:in 'fetch': key not found (KeyError)
    - from prog.rb:2
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -173
    -174
    -175
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 163
    -
    -def fetch(key, none=NONE, &block)
    -  unless self.key?(key)
    -    if block
    -      block.call(key)
    -    elsif !NONE.equal?(none)
    -      none
    -    else
    -      raise KeyError, "Key not found: #{key.inspect}"
    -    end
    -  else
    -    self[key]
    -  end
    -end
    -
    -
    - -
    -

    - - #fetch_values(*keys, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.fetch_values(key, …) -> array hsh.fetch_values(key, …) { |key| block } -> array

    - -

    Returns an array containing the values associated with the given keys but also raises KeyError when one of keys can’t be found. Also see Hash#values_at and Hash#fetch.

    - -

    h = { “cat” => “feline”, “dog” => “canine”, “cow” => “bovine” }

    - -

    h.fetch_values(“cow”, “cat”) #=> [“bovine”, “feline”] h.fetch_values(“cow”, “bird”) # raises KeyError h.fetch_values(“cow”, “bird”) { |k| k.upcase } #=> [“bovine”, “BIRD”]

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -479
    -480
    -481
    -482
    -483
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 479
    -
    -def fetch_values(*keys, &block)
    -  keys.map do |k|
    -    self.fetch(k, &block)
    -  end
    -end
    -
    -
    - -
    -

    - - #flatten(level = 1) ⇒ Object - - - - - -

    -
    - -

    call-seq: hash.flatten -> an_array hash.flatten(level) -> an_array

    - -

    Returns a new array that is a one-dimensional flattening of this hash. That is, for every key or value that is an array, extract its elements into the new array. Unlike Array#flatten, this method does not flatten recursively by default. The optional level argument determines the level of recursion to flatten.

    - -
    a =  {1=> "one", 2 => [2,"two"], 3 => "three"}
    -a.flatten    # => [1, "one", 2, [2, "two"], 3, "three"]
    -a.flatten(2) # => [1, "one", 2, 2, "two", 3, "three"]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -216
    -217
    -218
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 216
    -
    -def flatten(level=1)
    -  self.to_a.flatten(level)
    -end
    -
    -
    - -
    -

    - - #invertObject - - - - - -

    -
    - -

    call-seq: hsh.invert -> new_hash

    - -

    Returns a new hash created by using hsh’s values as keys, and the keys as values.

    - -
    h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 }
    -h.invert   #=> {0=>"a", 100=>"m", 200=>"d", 300=>"y"}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -231
    -232
    -233
    -234
    -235
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 231
    -
    -def invert
    -  h = self.class.new
    -  self.each {|k, v| h[v] = k }
    -  h
    -end
    -
    -
    - -
    -

    - - #keep_if(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.keep_if {| key, value | block } -> hsh hsh.keep_if -> an_enumerator

    - -

    Deletes every key-value pair from hsh for which block evaluates to false.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -248
    -249
    -250
    -251
    -252
    -253
    -254
    -255
    -256
    -257
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 248
    -
    -def keep_if(&block)
    -  return to_enum :keep_if unless block
    -
    -  self.each do |k, v|
    -    unless block.call([k, v])
    -      self.delete(k)
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #key(val) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.key(value) -> key

    - -

    Returns the key of an occurrence of a given value. If the value is not found, returns nil.

    - -
    h = { "a" => 100, "b" => 200, "c" => 300, "d" => 300 }
    -h.key(200)   #=> "b"
    -h.key(300)   #=> "c"
    -h.key(999)   #=> nil
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -272
    -273
    -274
    -275
    -276
    -277
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 272
    -
    -def key(val)
    -  self.each do |k, v|
    -    return k if v == val
    -  end
    -  nil
    -end
    -
    -
    - -
    -

    - - #merge(*others, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.merge(other_hash..) -> hsh hsh.merge(other_hash..){|key, oldval, newval| block} -> hsh

    - -

    Returns the new Hash formed by merging each of other_hashes into a copy of self.

    - -

    Each argument in other_hashes must be a Hash. Adds the contents of other_hash to hsh. If no block is specified, entries with duplicate keys are overwritten with the values from other_hash, otherwise the value of each duplicate key is determined by calling the block with the key, its value in hsh and its value in other_hash.

    - -

    Example: h = 0, bar: 1, baz: 2 h1 = 3, bar: 4 h2 = 5, bat:6 h3 = h.merge(h1, h2) { |key, old_value, new_value| old_value + new_value } h3 # => :bar=>5, :baz=>2, :bat=>9, :bam=>5

    - -

    ISO 15.2.13.4.22

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -183
    -184
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -193
    -194
    -195
    -196
    -
    -
    # File 'mrblib/hash.rb', line 183
    -
    -def merge(*others, &block)
    -  h = self.dup
    -  return h.__merge(*others) unless block
    -  i=0; len=others.size
    -  while i<len
    -    other = others[i]
    -    i += 1
    -    raise TypeError, "Hash required (#{other.class} given)" unless Hash === other
    -    other.each_key{|k|
    -      h[k] = (self.has_key?(k))? block.call(k, self[k], other[k]): other[k]
    -    }
    -  end
    -  h
    -end
    -
    -
    - -
    -

    - - #merge!(*others, &block) ⇒ Object - - - - Also known as: - update - - - - -

    -
    - -

    call-seq: hsh.merge!(other_hash..) -> hsh hsh.merge!(other_hash..){|key, oldval, newval| block} -> hsh

    - -

    Adds the contents of other_hash to hsh. If no block is specified, entries with duplicate keys are overwritten with the values from other_hash, otherwise the value of each duplicate key is determined by calling the block with the key, its value in hsh and its value in other_hash.

    - -
    h1 = { "a" => 100, "b" => 200 }
    -h2 = { "b" => 254, "c" => 300 }
    -h1.merge!(h2)   #=> {"a"=>100, "b"=>254, "c"=>300}
    -
    -h1 = { "a" => 100, "b" => 200 }
    -h2 = { "b" => 254, "c" => 300 }
    -h1.merge!(h2) { |key, v1, v2| v1 }
    -                #=> {"a"=>100, "b"=>200, "c"=>300}
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -84
    -85
    -86
    -87
    -88
    -89
    -90
    -91
    -92
    -93
    -94
    -95
    -96
    -97
    -98
    -99
    -100
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 84
    -
    -def merge!(*others, &block)
    -  i = 0; len=others.size
    -  return self.__merge(*others) unless block
    -  while i<len
    -    other = others[i]
    -    i += 1
    -    raise TypeError, "Hash required (#{other.class} given)" unless Hash === other
    -    if block
    -      other.each_key{|k|
    -        self[k] = (self.has_key?(k))? block.call(k, self[k], other[k]): other[k]
    -      }
    -    else
    -      other.each_key{|k| self[k] = other[k]}
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #reject(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.reject {|key, value| block} -> a_hash hsh.reject -> an_enumerator

    - -

    Returns a new hash consisting of entries for which the block returns false.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    h = { "a" => 100, "b" => 200, "c" => 300 }
    -h.reject {|k,v| k < "b"}  #=> {"b" => 200, "c" => 300}
    -h.reject {|k,v| v > 100}  #=> {"a" => 100}
    -
    - -

    1.8/1.9 Hash#reject returns Hash; ISO says nothing.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -239
    -240
    -241
    -242
    -243
    -244
    -245
    -246
    -247
    -248
    -249
    -
    -
    # File 'mrblib/hash.rb', line 239
    -
    -def reject(&block)
    -  return to_enum :reject unless block
    -
    -  h = {}
    -  self.each{|k,v|
    -    unless block.call([k, v])
    -      h[k] = v
    -    end
    -  }
    -  h
    -end
    -
    -
    - -
    -

    - - #reject!(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.reject! {| key, value | block } -> hsh or nil hsh.reject! -> an_enumerator

    - -

    Equivalent to Hash#delete_if, but returns nil if no changes were made.

    - -

    1.8/1.9 Hash#reject! returns Hash; ISO says nothing.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -208
    -209
    -210
    -211
    -212
    -213
    -214
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
    -
    -
    # File 'mrblib/hash.rb', line 208
    -
    -def reject!(&block)
    -  return to_enum :reject! unless block
    -
    -  keys = []
    -  self.each{|k,v|
    -    if block.call([k, v])
    -      keys.push(k)
    -    end
    -  }
    -  return nil if keys.size == 0
    -  keys.each{|k|
    -    self.delete(k)
    -  }
    -  self
    -end
    -
    -
    - -
    -

    - - #select(&block) ⇒ Object - - - - Also known as: - filter - - - - -

    -
    - -

    call-seq: hsh.select {|key, value| block} -> a_hash hsh.select -> an_enumerator

    - -

    Returns a new hash consisting of entries for which the block returns true.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    h = { "a" => 100, "b" => 200, "c" => 300 }
    -h.select {|k,v| k > "a"}  #=> {"b" => 200, "c" => 300}
    -h.select {|k,v| v < 200}  #=> {"a" => 100}
    -
    - -

    1.9 Hash#select returns Hash; ISO says nothing

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -292
    -293
    -294
    -295
    -296
    -297
    -298
    -299
    -300
    -301
    -302
    -
    -
    # File 'mrblib/hash.rb', line 292
    -
    -def select(&block)
    -  return to_enum :select unless block
    -
    -  h = {}
    -  self.each{|k,v|
    -    if block.call([k, v])
    -      h[k] = v
    -    end
    -  }
    -  h
    -end
    -
    -
    - -
    -

    - - #select!(&block) ⇒ Object - - - - Also known as: - filter! - - - - -

    -
    - -

    call-seq: hsh.select! {| key, value | block } -> hsh or nil hsh.select! -> an_enumerator

    - -

    Equivalent to Hash#keep_if, but returns nil if no changes were made.

    - -

    1.9 Hash#select! returns Hash; ISO says nothing.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -261
    -262
    -263
    -264
    -265
    -266
    -267
    -268
    -269
    -270
    -271
    -272
    -273
    -274
    -275
    -
    -
    # File 'mrblib/hash.rb', line 261
    -
    -def select!(&block)
    -  return to_enum :select! unless block
    -
    -  keys = []
    -  self.each{|k,v|
    -    unless block.call([k, v])
    -      keys.push(k)
    -    end
    -  }
    -  return nil if keys.size == 0
    -  keys.each{|k|
    -    self.delete(k)
    -  }
    -  self
    -end
    -
    -
    - -
    -

    - - #to_hObject - - - - - -

    -
    - -

    call-seq: hsh.to_h -> hsh or new_hash

    - -

    Returns self. If called on a subclass of Hash, converts the receiver to a Hash object.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -286
    -287
    -288
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 286
    -
    -def to_h
    -  self
    -end
    -
    -
    - -
    -

    - - #to_procObject - - - - - -

    - - - - -
    -
    -
    -
    -460
    -461
    -462
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 460
    -
    -def to_proc
    -  ->x{self[x]}
    -end
    -
    -
    - -
    -

    - - #transform_keys(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.transform_keys {|key| block } -> new_hash hsh.transform_keys -> an_enumerator

    - -

    Returns a new hash, with the keys computed from running the block once for each key in the hash, and the values unchanged.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -397
    -398
    -399
    -400
    -401
    -402
    -403
    -404
    -405
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 397
    -
    -def transform_keys(&block)
    -  return to_enum :transform_keys unless block
    -  hash = {}
    -  self.keys.each do |k|
    -    new_key = block.call(k)
    -    hash[new_key] = self[k]
    -  end
    -  hash
    -end
    -
    -
    - -
    -

    - - #transform_keys!(&block) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.transform_keys! {|key| block } -> hsh hsh.transform_keys! -> an_enumerator

    - -

    Invokes the given block once for each key in hsh, replacing it with the new key returned by the block, and then returns hsh.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -416
    -417
    -418
    -419
    -420
    -421
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 416
    -
    -def transform_keys!(&block)
    -  return to_enum :transform_keys! unless block
    -  hash = self.transform_keys(&block)
    -  self.replace(hash)
    -  self
    -end
    -
    -
    - -
    -

    - - #transform_values(&b) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.transform_values {|value| block } -> new_hash hsh.transform_values -> an_enumerator

    - -

    Returns a new hash with the results of running the block once for every value. This method does not change the keys.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -433
    -434
    -435
    -436
    -437
    -438
    -439
    -440
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 433
    -
    -def transform_values(&b)
    -  return to_enum :transform_values unless block_given?
    -  hash = {}
    -  self.keys.each do |k|
    -    hash[k] = yield(self[k])
    -  end
    -  hash
    -end
    -
    -
    - -
    -

    - - #transform_values!(&b) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.transform_values! {|key| block } -> hsh hsh.transform_values! -> an_enumerator

    - -

    Invokes the given block once for each value in the hash, replacing with the new value returned by the block, and then returns hsh.

    - -

    If no block is given, an enumerator is returned instead.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -452
    -453
    -454
    -455
    -456
    -457
    -458
    -
    -
    # File 'mrbgems/mruby-hash-ext/mrblib/hash.rb', line 452
    -
    -def transform_values!(&b)
    -  return to_enum :transform_values! unless block_given?
    -  self.keys.each do |k|
    -    self[k] = yield(self[k])
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/IO.html b/docs/api/IO.html deleted file mode 100644 index 5f7eb57..0000000 --- a/docs/api/IO.html +++ /dev/null @@ -1,1179 +0,0 @@ - - - - - - - Class: IO - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: IO - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-io/mrblib/io.rb
    -
    - -
    - -
    -

    Direct Known Subclasses

    -

    BasicSocket, File

    -
    - - - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Class Method Details

    - - -
    -

    - - .open(*args, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 10
    -
    -def self.open(*args, &block)
    -  io = self.new(*args)
    -
    -  return io unless block
    -
    -  begin
    -    yield io
    -  ensure
    -    begin
    -      io.close unless io.closed?
    -    rescue StandardError
    -    end
    -  end
    -end
    -
    -
    - -
    -

    - - .pipe(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 43
    -
    -def self.pipe(&block)
    -  if !self.respond_to?(:_pipe)
    -    raise NotImplementedError, "pipe is not supported on this platform"
    -  end
    -  if block
    -    begin
    -      r, w = IO._pipe
    -      yield r, w
    -    ensure
    -      r.close unless r.closed?
    -      w.close unless w.closed?
    -    end
    -  else
    -    IO._pipe
    -  end
    -end
    -
    -
    - -
    -

    - - .popen(command, mode = 'r', **opts, &block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 25
    -
    -def self.popen(command, mode = 'r', **opts, &block)
    -  if !self.respond_to?(:_popen)
    -    raise NotImplementedError, "popen is not supported on this platform"
    -  end
    -  io = self._popen(command, mode, **opts)
    -  return io unless block
    -
    -  begin
    -    yield io
    -  ensure
    -    begin
    -      io.close unless io.closed?
    -    rescue IOError
    -      # nothing
    -    end
    -  end
    -end
    -
    -
    - -
    -

    - - .read(path, length = nil, offset = 0, mode: "r") ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -77
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 60
    -
    -def self.read(path, length=nil, offset=0, mode: "r")
    -  str = ""
    -  fd = -1
    -  io = nil
    -  begin
    -    fd = IO.sysopen(path, mode)
    -    io = IO.open(fd, mode)
    -    io.seek(offset) if offset > 0
    -    str = io.read(length)
    -  ensure
    -    if io
    -      io.close
    -    elsif fd != -1
    -      IO._sysclose(fd)
    -    end
    -  end
    -  str
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #<<(str) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -85
    -86
    -87
    -88
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 85
    -
    -def <<(str)
    -  write(str)
    -  self
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - Also known as: - each_line - - - - -

    -
    - -

    15.2.20.5.3

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -113
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 113
    -
    -def each(&block)
    -  return to_enum unless block
    -
    -  while line = self.gets
    -    block.call(line)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_byte(&block) ⇒ Object - - - - - -

    -
    - -

    15.2.20.5.4

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -123
    -124
    -125
    -126
    -127
    -128
    -129
    -130
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 123
    -
    -def each_byte(&block)
    -  return to_enum(:each_byte) unless block
    -
    -  while byte = self.getbyte
    -    block.call(byte)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_char(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -135
    -136
    -137
    -138
    -139
    -140
    -141
    -142
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 135
    -
    -def each_char(&block)
    -  return to_enum(:each_char) unless block
    -
    -  while char = self.getc
    -    block.call(char)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #hashObject - - - - - -

    - - - - -
    -
    -
    -
    -79
    -80
    -81
    -82
    -83
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 79
    -
    -def hash
    -  # We must define IO#hash here because IO includes Enumerable and
    -  # Enumerable#hash will call IO#read() otherwise
    -  self.__id__
    -end
    -
    -
    - -
    -

    - - #pos=(i) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -93
    -94
    -95
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 93
    -
    -def pos=(i)
    -  seek(i, SEEK_SET)
    -end
    -
    -
    - -
    - - - - - -
    -
    -
    -
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 165
    -
    -def print(*args)
    -  i = 0
    -  len = args.size
    -  while i < len
    -    write args[i].to_s
    -    i += 1
    -  end
    -end
    -
    -
    - -
    -

    - - #printf(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -174
    -175
    -176
    -177
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 174
    -
    -def printf(*args)
    -  write sprintf(*args)
    -  nil
    -end
    -
    -
    - -
    -

    - - #puts(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 144
    -
    -def puts(*args)
    -  i = 0
    -  len = args.size
    -  if len == 0
    -    write "\n"
    -    return
    -  end
    -  while i < len
    -    s = args[i]
    -    if s.kind_of?(Array)
    -      puts(*s) if s.size > 0
    -    else
    -      s = s.to_s
    -      write s
    -      write "\n" if (s[-1] != "\n")
    -    end
    -    i += 1
    -  end
    -  nil
    -end
    -
    -
    - -
    -

    - - #rewindObject - - - - - -

    - - - - -
    -
    -
    -
    -97
    -98
    -99
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 97
    -
    -def rewind
    -  seek(0, SEEK_SET)
    -end
    -
    -
    - -
    -

    - - #ungetbyte(c) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -101
    -102
    -103
    -104
    -105
    -106
    -107
    -108
    -109
    -110
    -
    -
    # File 'mrbgems/mruby-io/mrblib/io.rb', line 101
    -
    -def ungetbyte(c)
    -  if c.is_a? String
    -    c = c.getbyte(0)
    -  else
    -    c &= 0xff
    -  end
    -  s = " "
    -  s.setbyte(0,c)
    -  ungetc s
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/IOError.html b/docs/api/IOError.html deleted file mode 100644 index 06497da..0000000 --- a/docs/api/IOError.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - Exception: IOError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: IOError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-io/mrblib/io.rb
    -
    - -
    - -

    Overview

    -
    - -

    IO

    - -

    ISO 15.2.20

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    EOFError

    -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/IPSocket.html b/docs/api/IPSocket.html deleted file mode 100644 index 744f561..0000000 --- a/docs/api/IPSocket.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - Class: IPSocket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: IPSocket - - - -

    -
    - -
    -
    Inherits:
    -
    - BasicSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - -
    -

    Direct Known Subclasses

    -

    TCPSocket, UDPSocket

    -
    - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #initialize, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -

    This class inherits a constructor from BasicSocket

    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .getaddress(host) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -209
    -210
    -211
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 209
    -
    -def self.getaddress(host)
    -  Addrinfo.ip(host).ip_address
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #addrObject - - - - - -

    - - - - -
    -
    -
    -
    -213
    -214
    -215
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 213
    -
    -def addr
    -  Addrinfo.new(self.getsockname)._to_array
    -end
    -
    -
    - -
    -

    - - #peeraddrObject - - - - - -

    - - - - -
    -
    -
    -
    -217
    -218
    -219
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 217
    -
    -def peeraddr
    -  Addrinfo.new(self.getpeername)._to_array
    -end
    -
    -
    - -
    -

    - - #recvfrom(maxlen, flags = 0) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -221
    -222
    -223
    -224
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 221
    -
    -def recvfrom(maxlen, flags=0)
    -  msg, sa = _recvfrom(maxlen, flags)
    -  [ msg, Addrinfo.new(sa)._to_array ]
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/IndexError.html b/docs/api/IndexError.html deleted file mode 100644 index 3b900b4..0000000 --- a/docs/api/IndexError.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - Exception: IndexError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: IndexError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.33

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    KeyError, StopIteration

    -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Integer.html b/docs/api/Integer.html deleted file mode 100644 index 1997b01..0000000 --- a/docs/api/Integer.html +++ /dev/null @@ -1,1004 +0,0 @@ - - - - - - - Class: Integer - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Integer - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/numeric.rb,
    - mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Integer

    - -

    ISO 15.2.8

    - - -
    -
    -
    - - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #allbits?(mask) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: int.allbits?(mask) -> true or false

    - -

    Returns true if all bits of int & mask are 1.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -71
    -72
    -73
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 71
    -
    -def allbits?(mask)
    -  (self & mask) == mask
    -end
    -
    -
    - -
    -

    - - #anybits?(mask) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: int.anybits?(mask) -> true or false

    - -

    Returns true if any bits of int & mask are 1.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -81
    -82
    -83
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 81
    -
    -def anybits?(mask)
    -  (self & mask) != 0
    -end
    -
    -
    - -
    -

    - - #ceildiv(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: ceildiv(other) -> integer

    - -

    Returns the result of division self by other. The result is rounded up to the nearest integer.

    - -

    3.ceildiv(3) # => 1 4.ceildiv(3) # => 2

    - -

    4.ceildiv(-3) # => -1 -4.ceildiv(3) # => -1 -4.ceildiv(-3) # => 2

    - -

    3.ceildiv(1.2) # => 3

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -109
    -110
    -111
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 109
    -
    -def ceildiv(other)
    -  -div(-other)
    -end
    -
    -
    - -
    -

    - - #downto(num, &block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block once for each Integer from self downto num.

    - -

    ISO 15.2.8.3.15

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -
    -
    # File 'mrblib/numeric.rb', line 47
    -
    -def downto(num, &block)
    -  return to_enum(:downto, num) unless block
    -
    -  i = self.to_i
    -  while i >= num
    -    block.call(i)
    -    i -= 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #integer?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -113
    -114
    -115
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 113
    -
    -def integer?
    -  true
    -end
    -
    -
    - -
    -

    - - #nextObject - - - - Also known as: - succ - - - - -

    -
    - -

    Returns self + 1

    - -

    ISO 15.2.8.3.19

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -62
    -63
    -64
    -
    -
    # File 'mrblib/numeric.rb', line 62
    -
    -def next
    -  self + 1
    -end
    -
    -
    - -
    -

    - - #nobits?(mask) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: int.nobits?(mask) -> true or false

    - -

    Returns true if no bits of int & mask are 1.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -91
    -92
    -93
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 91
    -
    -def nobits?(mask)
    -  (self & mask) == 0
    -end
    -
    -
    - -
    -

    - - #step(num = nil, step = 1, &block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block from self to num incremented by step (default 1).

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -103
    -104
    -105
    -106
    -107
    -108
    -109
    -110
    -111
    -112
    -113
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -
    -
    # File 'mrblib/numeric.rb', line 103
    -
    -def step(num=nil, step=1, &block)
    -  raise ArgumentError, "step can't be 0" if step == 0
    -  return to_enum(:step, num, step) unless block
    -
    -  i = __coerce_step_counter(step)
    -  if num == self || step.infinite?
    -    block.call(i) if step > 0 && i <= (num||i) || step < 0 && i >= (num||-i)
    -  elsif num == nil
    -    while true
    -      block.call(i)
    -      i += step
    -    end
    -  elsif step > 0
    -    while i <= num
    -      block.call(i)
    -      i += step
    -    end
    -  else
    -    while i >= num
    -      block.call(i)
    -      i += step
    -    end
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #times(&block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block self times.

    - -

    ISO 15.2.8.3.22

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -72
    -73
    -74
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -
    -
    # File 'mrblib/numeric.rb', line 72
    -
    -def times(&block)
    -  return to_enum :times unless block
    -
    -  i = 0
    -  while i < self
    -    block.call i
    -    i += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #upto(num, &block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block once for each Integer from self upto num.

    - -

    ISO 15.2.8.3.27

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -88
    -89
    -90
    -91
    -92
    -93
    -94
    -95
    -96
    -97
    -
    -
    # File 'mrblib/numeric.rb', line 88
    -
    -def upto(num, &block)
    -  return to_enum(:upto, num) unless block
    -
    -  i = self.to_i
    -  while i <= num
    -    block.call(i)
    -    i += 1
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Kernel.html b/docs/api/Kernel.html deleted file mode 100644 index e4c774f..0000000 --- a/docs/api/Kernel.html +++ /dev/null @@ -1,591 +0,0 @@ - - - - - - - Module: Kernel - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Kernel - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/kernel.rb,
    - mrblib/00kernel.rb,
    mrbgems/mruby-io/mrblib/kernel.rb,
    mrbgems/mruby-object-ext/mrblib/object.rb,
    mrbgems/mruby-enumerator/mrblib/enumerator.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Kernel

    - -

    ISO 15.3.1

    - - -
    -
    -
    - - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #!~(y) ⇒ Object - - - - - -

    -
    - -

    11.4.4 Step c)

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -38
    -39
    -40
    -
    -
    # File 'mrblib/kernel.rb', line 38
    -
    -def !~(y)
    -  !(self =~ y)
    -end
    -
    -
    - -
    -

    - - #extend(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: obj.extend(module, …) -> obj

    - -

    Adds to obj the instance methods from each module given as a parameter.

    - -

    module Mod def hello “Hello from Mod.n” end end

    - -

    class Klass def hello “Hello from Klass.n” end end

    - -

    k = Klass.new k.hello #=> “Hello from Klass.n” k.extend(Mod) #=> #<Klass:0x401b3bc8> k.hello #=> “Hello from Mod.n”

    - -

    ISO 15.3.1.3.13

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -
    -
    # File 'mrblib/00kernel.rb', line 27
    -
    -def extend(*args)
    -  args.reverse!
    -  obj = self
    -  args.each do |m|
    -    m.__send__(:extend_object, obj)
    -    m.__send__(:extended, obj)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #tap {|_self| ... } ⇒ Object - - - - - -

    -
    - -

    call-seq: obj.tap{|x|…} -> obj

    - -

    Yields x to the block, and then returns x. The primary purpose of this method is to “tap into” a method chain, in order to perform operations on intermediate results within the chain.

    - -

    (1..10) .tap {|x| puts “original: #{x.inspect}”} .to_a .tap {|x| puts “array: #{x.inspect}”} .select {|x| x%2==0} .tap {|x| puts “evens: #{x.inspect}”} .map { |x| x*x } .tap {|x| puts “squares: #{x.inspect}”}

    - - -
    -
    -
    - -

    Yields:

    -
      - -
    • - - - (_self) - - - -
    • - -
    -

    Yield Parameters:

    -
      - -
    • - - _self - - - (Kernel) - - - - — -
      -

      the object that the method was called on

      -
      - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -29
    -30
    -31
    -32
    -
    -
    # File 'mrbgems/mruby-object-ext/mrblib/object.rb', line 29
    -
    -def tap
    -  yield self
    -  self
    -end
    -
    -
    - -
    -

    - - #to_enum(meth = :each, *args, **kwd) ⇒ Object - - - - Also known as: - enum_for - - - - -

    -
    - -

    call-seq: obj.to_enum(method = :each, args) -> enum obj.enum_for(method = :each, args) -> enum

    - -

    Creates a new Enumerator which will enumerate by calling method on obj, passing args if any.

    - -

    === Examples

    - -

    str = “xyz”

    - -

    enum = str.enum_for(:each_byte) enum.each { |b| puts b } # => 120 # => 121 # => 122

    - -

    # protect an array from being modified by some_method a = [1, 2, 3] some_method(a.to_enum)

    - -

    It is typical to call to_enum when defining methods for a generic Enumerable, in case no block is passed.

    - -

    Here is such an example with parameter passing:

    - -
    module Enumerable
    -  # a generic method to repeat the values of any enumerable
    -  def repeat(n)
    -    raise ArgumentError, "#{n} is negative!" if n < 0
    -    unless block_given?
    -      return to_enum(__callee__, n) do # __callee__ is :repeat here
    -    end
    -    each do |*val|
    -      n.times { yield *val }
    -    end
    -  end
    -end
    -
    -%i[hello world].repeat(2) { |w| puts w }
    -  # => Prints 'hello', 'hello', 'world', 'world'
    -enum = (1..14).repeat(3)
    -  # => returns an Enumerator when called without a block
    -enum.first(4) # => [1, 1, 1, 2]
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -662
    -663
    -664
    -
    -
    # File 'mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 662
    -
    -def to_enum(*a)
    -  raise NotImplementedError.new("fiber required for enumerator")
    -end
    -
    -
    - -
    -

    - - #yield_self(&block) ⇒ Object - - - - Also known as: - then - - - - -

    -
    - -

    call-seq: obj.yield_self {|_obj|…} -> an_object obj.then {|_obj|…} -> an_object

    - -

    Yields obj and returns the result.

    - -

    ‘my string’.yield_self {|s|s.upcase} #=> “MY STRING”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -10
    -11
    -12
    -13
    -
    -
    # File 'mrbgems/mruby-object-ext/mrblib/object.rb', line 10
    -
    -def yield_self(&block)
    -  return to_enum :yield_self unless block
    -  block.call(self)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/KeyError.html b/docs/api/KeyError.html deleted file mode 100644 index 9818c82..0000000 --- a/docs/api/KeyError.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Exception: KeyError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: KeyError - - - -

    -
    - -
    -
    Inherits:
    -
    - IndexError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - - - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/LocalJumpError.html b/docs/api/LocalJumpError.html deleted file mode 100644 index 5a9f5f2..0000000 --- a/docs/api/LocalJumpError.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Exception: LocalJumpError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: LocalJumpError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.25

    - - -
    -
    -
    - - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Math.html b/docs/api/Math.html deleted file mode 100644 index 85298e6..0000000 --- a/docs/api/Math.html +++ /dev/null @@ -1,2725 +0,0 @@ - - - - - - - Module: Math - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: Math - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-math/src/math.c
    -
    - -
    - - - - - - - - - -

    - Class Method Summary - collapse -

    - -
      - -
    • - - - .acos(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the arc cosine of x.

      -
      - -
    • - - -
    • - - - .acosh(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the inverse hyperbolic cosine of x.

      -
      - -
    • - - -
    • - - - .asin(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the arc sine of x.

      -
      - -
    • - - -
    • - - - .asinh(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the inverse hyperbolic sine of x.

      -
      - -
    • - - -
    • - - - .atan(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the arc tangent of x.

      -
      - -
    • - - -
    • - - - .atan2(y, x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the arc tangent given y and x.

      -
      - -
    • - - -
    • - - - .atanh(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the inverse hyperbolic tangent of x.

      -
      - -
    • - - -
    • - - - .cbrt(numeric) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the cube root of numeric.

      -
      - -
    • - - -
    • - - - .cos(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the cosine of x (expressed in radians).

      -
      - -
    • - - -
    • - - - .cosh(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the hyperbolic cosine of x (expressed in radians).

      -
      - -
    • - - -
    • - - - .erf(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Calculates the error function of x.

      -
      - -
    • - - -
    • - - - .erfc(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Calculates the complementary error function of x.

      -
      - -
    • - - -
    • - - - .exp(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns e**x.

      -
      - -
    • - - -
    • - - - .frexp(numeric) ⇒ Array - - - - - - - - - - - - - -
      -

      Returns a two-element array containing the normalized fraction (a Float) and exponent (a Integer) of numeric.

      -
      - -
    • - - -
    • - - - .hypot(x, y) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns sqrt(x2 + y2), the hypotenuse of a right-angled triangle with sides x and y.

      -
      - -
    • - - -
    • - - - .ldexp(flt, int) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the value of flt(2*int).

      -
      - -
    • - - -
    • - - - .log ⇒ Object - - - - - - - - - - - - - -
      -

      Returns the natural logarithm of numeric.

      -
      - -
    • - - -
    • - - - .log10(numeric) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the base 10 logarithm of numeric.

      -
      - -
    • - - -
    • - - - .log2(numeric) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the base 2 logarithm of numeric.

      -
      - -
    • - - -
    • - - - .sin(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the sine of x (expressed in radians).

      -
      - -
    • - - -
    • - - - .sinh(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the hyperbolic sine of x (expressed in radians).

      -
      - -
    • - - -
    • - - - .sqrt(numeric) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the square root of numeric.

      -
      - -
    • - - -
    • - - - .tan(x) ⇒ Float - - - - - - - - - - - - - -
      -

      Returns the tangent of x (expressed in radians).

      -
      - -
    • - - -
    • - - - .tanh ⇒ Float - - - - - - - - - - - - - -
      -

      Computes the hyperbolic tangent of x (expressed in radians).

      -
      - -
    • - - -
    - - - - -
    -

    Class Method Details

    - - -
    -

    - - .acos(x) ⇒ Float - - - - - -

    -
    - -

    Computes the arc cosine of x. Returns 0..PI.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -254
    -255
    -256
    -257
    -258
    -259
    -260
    -261
    -262
    -263
    -264
    -265
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 254
    -
    -static mrb_value
    -math_acos(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < -1.0 || x > 1.0) {
    -    domain_error(mrb, "acos");
    -  }
    -  x = acos(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .acosh(x) ⇒ Float - - - - - -

    -
    - -

    Computes the inverse hyperbolic cosine of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -378
    -379
    -380
    -381
    -382
    -383
    -384
    -385
    -386
    -387
    -388
    -389
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 378
    -
    -static mrb_value
    -math_acosh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < 1.0) {
    -    domain_error(mrb, "acosh");
    -  }
    -  x = acosh(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .asin(x) ⇒ Float - - - - - -

    -
    - -

    Computes the arc sine of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      computed value between -(PI/2) and (PI/2).

      -
      - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -235
    -236
    -237
    -238
    -239
    -240
    -241
    -242
    -243
    -244
    -245
    -246
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 235
    -
    -static mrb_value
    -math_asin(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < -1.0 || x > 1.0) {
    -    domain_error(mrb, "asin");
    -  }
    -  x = asin(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .asinh(x) ⇒ Float - - - - - -

    -
    - -

    Computes the inverse hyperbolic sine of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -365
    -366
    -367
    -368
    -369
    -370
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 365
    -
    -static mrb_value
    -math_asinh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = asinh(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .atan(x) ⇒ Float - - - - - -

    -
    - -

    Computes the arc tangent of x. Returns -(PI/2) .. (PI/2).

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -273
    -274
    -275
    -276
    -277
    -278
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 273
    -
    -static mrb_value
    -math_atan(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = atan(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .atan2(y, x) ⇒ Float - - - - - -

    -
    - -

    Computes the arc tangent given y and x. Returns -PI..PI.

    - -

    Math.atan2(-0.0, -1.0) #=> -3.141592653589793 Math.atan2(-1.0, -1.0) #=> -2.356194490192345 Math.atan2(-1.0, 0.0) #=> -1.5707963267948966 Math.atan2(-1.0, 1.0) #=> -0.7853981633974483 Math.atan2(-0.0, 1.0) #=> -0.0 Math.atan2(0.0, 1.0) #=> 0.0 Math.atan2(1.0, 1.0) #=> 0.7853981633974483 Math.atan2(1.0, 0.0) #=> 1.5707963267948966 Math.atan2(1.0, -1.0) #=> 2.356194490192345 Math.atan2(0.0, -1.0) #=> 3.141592653589793

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -299
    -300
    -301
    -302
    -303
    -304
    -305
    -306
    -307
    -308
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 299
    -
    -static mrb_value
    -math_atan2(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x, y;
    -
    -  mrb_get_args(mrb, "ff", &x, &y);
    -  x = atan2(x, y);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .atanh(x) ⇒ Float - - - - - -

    -
    - -

    Computes the inverse hyperbolic tangent of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -397
    -398
    -399
    -400
    -401
    -402
    -403
    -404
    -405
    -406
    -407
    -408
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 397
    -
    -static mrb_value
    -math_atanh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < -1.0 || x > 1.0) {
    -    domain_error(mrb, "atanh");
    -  }
    -  x = atanh(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .cbrt(numeric) ⇒ Float - - - - - -

    -
    - -

    Returns the cube root of numeric.

    - -

    -9.upto(9) {|x| p [x, Math.cbrt(x), Math.cbrt(x)**3] } #=> [-9, -2.0800838230519, -9.0] [-8, -2.0, -8.0] [-7, -1.91293118277239, -7.0] [-6, -1.81712059283214, -6.0] [-5, -1.7099759466767, -5.0] [-4, -1.5874010519682, -4.0] [-3, -1.44224957030741, -3.0] [-2, -1.25992104989487, -2.0] [-1, -1.0, -1.0] [0, 0.0, 0.0] [1, 1.0, 1.0] [2, 1.25992104989487, 2.0] [3, 1.44224957030741, 3.0] [4, 1.5874010519682, 4.0] [5, 1.7099759466767, 5.0] [6, 1.81712059283214, 6.0] [7, 1.91293118277239, 7.0] [8, 2.0, 8.0] [9, 2.0800838230519, 9.0]

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -568
    -569
    -570
    -571
    -572
    -573
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 568
    -
    -static mrb_value
    -math_cbrt(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = cbrt(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .cos(x) ⇒ Float - - - - - -

    -
    - -

    Computes the cosine of x (expressed in radians). Returns -1..1.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -204
    -205
    -206
    -207
    -208
    -209
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 204
    -
    -static mrb_value
    -math_cos(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = cos(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .cosh(x) ⇒ Float - - - - - -

    -
    - -

    Computes the hyperbolic cosine of x (expressed in radians).

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -333
    -334
    -335
    -336
    -337
    -338
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 333
    -
    -static mrb_value
    -math_cosh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = cosh(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .erf(x) ⇒ Float - - - - - -

    -
    - -

    Calculates the error function of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -645
    -646
    -647
    -648
    -649
    -650
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 645
    -
    -static mrb_value
    -math_erf(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = erf(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .erfc(x) ⇒ Float - - - - - -

    -
    - -

    Calculates the complementary error function of x.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -659
    -660
    -661
    -662
    -663
    -664
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 659
    -
    -static mrb_value
    -math_erfc(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = erfc(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .exp(x) ⇒ Float - - - - - -

    -
    - -

    Returns e**x.

    - -

    Math.exp(0) #=> 1.0 Math.exp(1) #=> 2.718281828459045 Math.exp(1.5) #=> 4.4816890703380645

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -425
    -426
    -427
    -428
    -429
    -430
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 425
    -
    -static mrb_value
    -math_exp(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = exp(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .frexp(numeric) ⇒ Array - - - - - -

    -
    - -

    Returns a two-element array containing the normalized fraction (a Float) and exponent (a Integer) of numeric.

    - -

    fraction, exponent = Math.frexp(1234) #=> [0.6025390625, 11] fraction * 2**exponent #=> 1234.0

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Array) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -587
    -588
    -589
    -590
    -591
    -592
    -593
    -594
    -595
    -596
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 587
    -
    -static mrb_value
    -math_frexp(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -  int exp;
    -
    -  x = frexp(x, &exp);
    -
    -  return mrb_assoc_new(mrb, mrb_float_value(mrb, x), mrb_fixnum_value(exp));
    -}
    -
    -
    - -
    -

    - - .hypot(x, y) ⇒ Float - - - - - -

    -
    - -

    Returns sqrt(x2 + y2), the hypotenuse of a right-angled triangle with sides x and y.

    - -

    Math.hypot(3, 4) #=> 5.0

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -628
    -629
    -630
    -631
    -632
    -633
    -634
    -635
    -636
    -637
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 628
    -
    -static mrb_value
    -math_hypot(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x, y;
    -
    -  mrb_get_args(mrb, "ff", &x, &y);
    -  x = hypot(x, y);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .ldexp(flt, int) ⇒ Float - - - - - -

    -
    - -

    Returns the value of flt(2*int).

    - -

    fraction, exponent = Math.frexp(1234) Math.ldexp(fraction, exponent) #=> 1234.0

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -607
    -608
    -609
    -610
    -611
    -612
    -613
    -614
    -615
    -616
    -617
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 607
    -
    -static mrb_value
    -math_ldexp(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x;
    -  mrb_int   i;
    -
    -  mrb_get_args(mrb, "fi", &x, &i);
    -  x = ldexp(x, (int)i);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - - .log(numeric) ⇒ Float - - .log(num, base) ⇒ Float - - - - - - -

    -
    - -

    Returns the natural logarithm of numeric. If additional second argument is given, it will be the base of logarithm.

    - -

    Math.log(1) #=> 0.0 Math.log(Math::E) #=> 1.0 Math.log(Math::E**3) #=> 3.0 Math.log(12,3) #=> 2.2618595071429146

    - - -
    -
    -
    - -

    Overloads:

    -
      - - -
    • - .log(numeric) ⇒ Float -
      -
      - - -
      -
      -
      - -

      Returns:

      -
        - -
      • - - - (Float) - - - -
      • - -
      - -
      - - -
    • - - -
    • - .log(num, base) ⇒ Float -
      -
      - - -
      -
      -
      - -

      Returns:

      -
        - -
      • - - - (Float) - - - -
      • - -
      - -
      - - -
    • - -
    - - -
    - - - - - - -
    -
    -
    -
    -447
    -448
    -449
    -450
    -451
    -452
    -453
    -454
    -455
    -456
    -457
    -458
    -459
    -460
    -461
    -462
    -463
    -464
    -465
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 447
    -
    -static mrb_value
    -math_log(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x, base;
    -  mrb_int argc;
    -
    -  argc = mrb_get_args(mrb, "f|f", &x, &base);
    -  if (x < 0.0) {
    -    domain_error(mrb, "log");
    -  }
    -  x = log(x);
    -  if (argc == 2) {
    -    if (base < 0.0) {
    -      domain_error(mrb, "log");
    -    }
    -    x /= log(base);
    -  }
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .log10(numeric) ⇒ Float - - - - - -

    -
    - -

    Returns the base 10 logarithm of numeric.

    - -

    Math.log10(1) #=> 0.0 Math.log10(10) #=> 1.0 Math.log10(10**100) #=> 100.0

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -503
    -504
    -505
    -506
    -507
    -508
    -509
    -510
    -511
    -512
    -513
    -514
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 503
    -
    -static mrb_value
    -math_log10(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < 0.0) {
    -    domain_error(mrb, "log10");
    -  }
    -  x = log10(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .log2(numeric) ⇒ Float - - - - - -

    -
    - -

    Returns the base 2 logarithm of numeric.

    - -

    Math.log2(1) #=> 0.0 Math.log2(2) #=> 1.0 Math.log2(32768) #=> 15.0 Math.log2(65536) #=> 16.0

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -479
    -480
    -481
    -482
    -483
    -484
    -485
    -486
    -487
    -488
    -489
    -490
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 479
    -
    -static mrb_value
    -math_log2(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < 0.0) {
    -    domain_error(mrb, "log2");
    -  }
    -  x = log2(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .sin(x) ⇒ Float - - - - - -

    -
    - -

    Computes the sine of x (expressed in radians). Returns -1..1.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -190
    -191
    -192
    -193
    -194
    -195
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 190
    -
    -static mrb_value
    -math_sin(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = sin(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .sinh(x) ⇒ Float - - - - - -

    -
    - -

    Computes the hyperbolic sine of x (expressed in radians).

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -320
    -321
    -322
    -323
    -324
    -325
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 320
    -
    -static mrb_value
    -math_sinh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = sinh(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .sqrt(numeric) ⇒ Float - - - - - -

    -
    - -

    Returns the square root of numeric.

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -523
    -524
    -525
    -526
    -527
    -528
    -529
    -530
    -531
    -532
    -533
    -534
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 523
    -
    -static mrb_value
    -math_sqrt(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = get_float_arg(mrb);
    -
    -  if (x < 0.0) {
    -    domain_error(mrb, "sqrt");
    -  }
    -  x = sqrt(x);
    -
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .tan(x) ⇒ Float - - - - - -

    -
    - -

    Returns the tangent of x (expressed in radians).

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -217
    -218
    -219
    -220
    -221
    -222
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 217
    -
    -static mrb_value
    -math_tan(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = tan(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    -

    - - .tanhFloat - - - - - -

    -
    - -

    Computes the hyperbolic tangent of x (expressed in radians).

    - - -
    -
    -
    - -
    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - - - -
    - - - - - - -
    -
    -
    -
    -347
    -348
    -349
    -350
    -351
    -352
    -
    -
    # File 'mrbgems/mruby-math/src/math.c', line 347
    -
    -static mrb_value
    -math_tanh(mrb_state *mrb, mrb_value obj)
    -{
    -  mrb_float x = tanh(get_float_arg(mrb));
    -  return mrb_float_value(mrb, x);
    -}
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Method.html b/docs/api/Method.html deleted file mode 100644 index 8734884..0000000 --- a/docs/api/Method.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - Class: Method - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Method - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-method/mrblib/method.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #<<(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -9
    -10
    -11
    -
    -
    # File 'mrbgems/mruby-method/mrblib/method.rb', line 9
    -
    -def <<(other)
    -  ->(*args, **opts, &block) { call(other.call(*args, **opts, &block)) }
    -end
    -
    -
    - -
    -

    - - #>>(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -13
    -14
    -15
    -
    -
    # File 'mrbgems/mruby-method/mrblib/method.rb', line 13
    -
    -def >>(other)
    -  ->(*args, **opts, &block) { other.call(call(*args, **opts, &block)) }
    -end
    -
    -
    - -
    -

    - - #to_procObject - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -5
    -6
    -7
    -
    -
    # File 'mrbgems/mruby-method/mrblib/method.rb', line 2
    -
    -def to_proc
    -  m = self
    -  lambda { |*args, **opts, &b|
    -    m.call(*args, **opts, &b)
    -  }
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Module.html b/docs/api/Module.html deleted file mode 100644 index 51fada4..0000000 --- a/docs/api/Module.html +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - - Class: Module - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Module - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/00class.rb,
    - mrbgems/mruby-class-ext/mrblib/module.rb
    -
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #<(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: mod < other -> true, false, or nil

    - -

    Returns true if mod is a subclass of other. Returns nil if there’s no relationship between the two. (Think of the relationship in terms of the class definition: “class A < B” implies “A < B”.)

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -
    -
    # File 'mrbgems/mruby-class-ext/mrblib/module.rb', line 12
    -
    -def <(other)
    -  if self.equal?(other)
    -    false
    -  else
    -    self <= other
    -  end
    -end
    -
    -
    - -
    -

    - - #<=(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: mod <= other -> true, false, or nil

    - -

    Returns true if mod is a subclass of other or is the same as other. Returns nil if there’s no relationship between the two. (Think of the relationship in terms of the class definition: “class A < B” implies “A < B”.)

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -
    -
    # File 'mrbgems/mruby-class-ext/mrblib/module.rb', line 29
    -
    -def <=(other)
    -  raise TypeError, 'compared with non class/module' unless other.is_a?(Module)
    -  if self.ancestors.include?(other)
    -    return true
    -  elsif other.ancestors.include?(self)
    -    return false
    -  end
    -end
    -
    -
    - -
    -

    - - #<=>(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: module <=> other_module -> -1, 0, +1, or nil

    - -

    Comparison—Returns -1, 0, +1 or nil depending on whether module includes other_module, they are the same, or if module is included by other_module.

    - -

    Returns nil if module has no relationship with other_module, if other_module is not a module, or if the two values are incomparable.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    -
    -
    # File 'mrbgems/mruby-class-ext/mrblib/module.rb', line 81
    -
    -def <=>(other)
    -  return 0 if self.equal?(other)
    -  return nil unless other.is_a?(Module)
    -  cmp = self < other
    -  return -1 if cmp
    -  return 1 unless cmp.nil?
    -  return nil
    -end
    -
    -
    - -
    -

    - - #>(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: mod > other -> true, false, or nil

    - -

    Returns true if mod is an ancestor of other. Returns nil if there’s no relationship between the two. (Think of the relationship in terms of the class definition: “class A < B” implies “B > A”.)

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -
    -
    # File 'mrbgems/mruby-class-ext/mrblib/module.rb', line 47
    -
    -def >(other)
    -  if self.equal?(other)
    -    false
    -  else
    -    self >= other
    -  end
    -end
    -
    -
    - -
    -

    - - #>=(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: mod >= other -> true, false, or nil

    - -

    Returns true if mod is an ancestor of other, or the two modules are the same. Returns nil if there’s no relationship between the two. (Think of the relationship in terms of the class definition: “class A < B” implies “B > A”.)

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -65
    -66
    -67
    -68
    -
    -
    # File 'mrbgems/mruby-class-ext/mrblib/module.rb', line 65
    -
    -def >=(other)
    -  raise TypeError, 'compared with non class/module' unless other.is_a?(Module)
    -  return other < self
    -end
    -
    -
    - -
    -

    - - #include(*args) ⇒ Object - - - - - -

    -
    - -

    15.2.2.4.27

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -
    -
    # File 'mrblib/00class.rb', line 16
    -
    -def include(*args)
    -  args.reverse!
    -  mod = self
    -  args.each do |m|
    -    m.__send__(:append_features, mod)
    -    m.__send__(:included, mod)
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #prepend(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -
    -
    # File 'mrblib/00class.rb', line 26
    -
    -def prepend(*args)
    -  args.reverse!
    -  mod = self
    -  args.each do |m|
    -    m.__send__(:prepend_features, mod)
    -    m.__send__(:prepended, mod)
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/NameError.html b/docs/api/NameError.html deleted file mode 100644 index 872aa3d..0000000 --- a/docs/api/NameError.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - Exception: NameError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: NameError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.31

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    NoMethodError

    -
    - - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #name ⇒ Object - - - - - - - - - - - - - - - - -
      -

      Returns the value of attribute name.

      -
      - -
    • - - -
    - - - - - -

    - Instance Method Summary - collapse -

    - - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(message = nil, name = nil) ⇒ NameError - - - - - -

    -
    - -

    Returns a new instance of NameError.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -45
    -46
    -47
    -48
    -
    -
    # File 'mrblib/10error.rb', line 45
    -
    -def initialize(message=nil, name=nil)
    -  @name = name
    -  super(message)
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #nameObject - - - - - -

    -
    - -

    Returns the value of attribute name.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -43
    -44
    -45
    -
    -
    # File 'mrblib/10error.rb', line 43
    -
    -def name
    -  @name
    -end
    -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/NoMethodError.html b/docs/api/NoMethodError.html deleted file mode 100644 index 8091070..0000000 --- a/docs/api/NoMethodError.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - Exception: NoMethodError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: NoMethodError - - - -

    -
    - -
    -
    Inherits:
    -
    - NameError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.32

    - - -
    -
    -
    - - -
    - - - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #args ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute args.

      -
      - -
    • - - -
    - - - - - -

    Attributes inherited from NameError

    -

    #name

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(message = nil, name = nil, args = nil) ⇒ NoMethodError - - - - - -

    -
    - -

    Returns a new instance of NoMethodError.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -55
    -56
    -57
    -58
    -
    -
    # File 'mrblib/10error.rb', line 55
    -
    -def initialize(message=nil, name=nil, args=nil)
    -  @args = args
    -  super message, name
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #argsObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute args.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -53
    -54
    -55
    -
    -
    # File 'mrblib/10error.rb', line 53
    -
    -def args
    -  @args
    -end
    -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/NotImplementedError.html b/docs/api/NotImplementedError.html deleted file mode 100644 index 99a4f72..0000000 --- a/docs/api/NotImplementedError.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - Exception: NotImplementedError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: NotImplementedError - - - -

    -
    - -
    -
    Inherits:
    -
    - ScriptError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Numeric.html b/docs/api/Numeric.html deleted file mode 100644 index 5c5886b..0000000 --- a/docs/api/Numeric.html +++ /dev/null @@ -1,920 +0,0 @@ - - - - - - - Class: Numeric - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Numeric - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Comparable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/numeric.rb,
    - mrbgems/mruby-complex/mrblib/complex.rb,
    mrbgems/mruby-rational/mrblib/rational.rb,
    mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Numeric

    - -

    ISO 15.2.7

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    Complex, Rational

    -
    - - - - - - - - -

    - Instance Method Summary - collapse -

    - -
      - -
    • - - - #+@ ⇒ Object - - - - - - - - - - - - - -
      -

      Returns the receiver simply.

      -
      - -
    • - - -
    • - - - #-@ ⇒ Object - - - - - - - - - - - - - -
      -

      Returns the receiver’s value, negated.

      -
      - -
    • - - -
    • - - - #abs ⇒ Object - - - - - - - - - - - - - -
      -

      Returns the absolute value of the receiver.

      -
      - -
    • - - -
    • - - - #integer? ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: num.integer? -> true or false.

      -
      - -
    • - - -
    • - - - #negative? ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: negative? -> true or false.

      -
      - -
    • - - -
    • - - - #nonzero? ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: nonzero? -> self or nil.

      -
      - -
    • - - -
    • - - - #positive? ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: positive? -> true or false.

      -
      - -
    • - - -
    • - - - #to_c ⇒ Object - - - - - - - - - - - - - -
      - -
    • - - -
    • - - - #to_r ⇒ Object - - - - - - - - - - - - - -
      - -
    • - - -
    • - - - #zero? ⇒ Boolean - - - - - - - - - - - - - -
      -

      call-seq: zero? -> true or false.

      -
      - -
    • - - -
    - - - - - - - - - - - -

    Methods included from Comparable

    -

    #<, #<=, #==, #>, #>=, #between?, #clamp

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #+@Object - - - - - -

    -
    - -

    Returns the receiver simply.

    - -

    ISO 15.2.7.4.1

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -11
    -12
    -13
    -
    -
    # File 'mrblib/numeric.rb', line 11
    -
    -def +@
    -  self
    -end
    -
    -
    - -
    -

    - - #-@Object - - - - - -

    -
    - -

    Returns the receiver’s value, negated.

    - -

    ISO 15.2.7.4.2

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -19
    -20
    -21
    -
    -
    # File 'mrblib/numeric.rb', line 19
    -
    -def -@
    -  0 - self
    -end
    -
    -
    - -
    -

    - - #absObject - - - - - -

    -
    - -

    Returns the absolute value of the receiver.

    - -

    ISO 15.2.7.4.3

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -
    -
    # File 'mrblib/numeric.rb', line 27
    -
    -def abs
    -  if self < 0
    -    -self
    -  else
    -    self
    -  end
    -end
    -
    -
    - -
    -

    - - #integer?Boolean - - - - - -

    -
    - -

    call-seq: num.integer? -> true or false

    - -

    Returns true if num is an Integer.

    - -

    1.0.integer? #=> false 1.integer? #=> true

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -59
    -60
    -61
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 59
    -
    -def integer?
    -  false
    -end
    -
    -
    - -
    -

    - - #negative?Boolean - - - - - -

    -
    - -

    call-seq: negative? -> true or false

    - -

    Returns true if self is less than 0, false otherwise.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -46
    -47
    -48
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 46
    -
    -def negative?
    -  self < 0
    -end
    -
    -
    - -
    -

    - - #nonzero?Boolean - - - - - -

    -
    - -

    call-seq: nonzero? -> self or nil

    - -

    Returns self if self is not a zero value, nil otherwise; uses method zero? for the evaluation.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 22
    -
    -def nonzero?
    -  if self == 0
    -    nil
    -  else
    -    self
    -  end
    -end
    -
    -
    - -
    -

    - - #positive?Boolean - - - - - -

    -
    - -

    call-seq: positive? -> true or false

    - -

    Returns true if self is greater than 0, false otherwise.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -36
    -37
    -38
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 36
    -
    -def positive?
    -  self > 0
    -end
    -
    -
    - -
    -

    - - #to_cObject - - - - - -

    - - - - -
    -
    -
    -
    -86
    -87
    -88
    -
    -
    # File 'mrbgems/mruby-complex/mrblib/complex.rb', line 86
    -
    -def to_c
    -  Complex(self, 0)
    -end
    -
    -
    - -
    -

    - - #to_rObject - - - - - -

    - - - - -
    -
    -
    -
    -19
    -20
    -21
    -
    -
    # File 'mrbgems/mruby-rational/mrblib/rational.rb', line 19
    -
    -def to_r
    -  Rational(self, 1)
    -end
    -
    -
    - -
    -

    - - #zero?Boolean - - - - - -

    -
    - -

    call-seq: zero? -> true or false

    - -

    Returns true if zero has a zero value, false otherwise.

    - -

    Of the Core and Standard Library classes, only Rational and Complex use this implementation.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -11
    -12
    -13
    -
    -
    # File 'mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb', line 11
    -
    -def zero?
    -  self == 0
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/ObjectSpace.html b/docs/api/ObjectSpace.html deleted file mode 100644 index 3b16984..0000000 --- a/docs/api/ObjectSpace.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - Module: ObjectSpace - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Module: ObjectSpace - - - -

    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-objectspace/src/mruby_objectspace.c
    -
    - -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Proc.html b/docs/api/Proc.html deleted file mode 100644 index b8d6a84..0000000 --- a/docs/api/Proc.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - - - - Class: Proc - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Proc - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-proc-ext/mrblib/proc.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - -
    -

    Instance Method Details

    - - -
    -

    - - #<<(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -42
    -43
    -44
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 42
    -
    -def <<(other)
    -  ->(*args, **opts, &block) { call(other.call(*args, **opts, &block)) }
    -end
    -
    -
    - -
    -

    - - #===(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -3
    -4
    -5
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 3
    -
    -def ===(*args)
    -  call(*args)
    -end
    -
    -
    - -
    -

    - - #>>(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -46
    -47
    -48
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 46
    -
    -def >>(other)
    -  ->(*args, **opts, &block) { other.call(call(*args, **opts, &block)) }
    -end
    -
    -
    - -
    -

    - - #curry(arity = self.arity) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 15
    -
    -def curry(arity=self.arity)
    -  type = :proc
    -  abs = lambda {|a| a < 0 ? -a - 1 : a}
    -  arity = abs[arity]
    -  if lambda?
    -    type = :lambda
    -    self_arity = self.arity
    -    if (self_arity >= 0 && arity != self_arity) ||
    -       (self_arity < 0 && abs[self_arity] > arity)
    -      raise ArgumentError, "wrong number of arguments (given #{arity}, expected #{abs[self_arity]})"
    -    end
    -  end
    -
    -  pproc = self
    -  make_curry = proc do |given_args=[]|
    -    __send__(type) do |*args|
    -      new_args = given_args + args
    -      if new_args.size >= arity
    -        pproc[*new_args]
    -      else
    -        make_curry[new_args]
    -      end
    -    end
    -  end
    -  make_curry.call
    -end
    -
    -
    - -
    -

    - - #to_procObject - - - - - -

    - - - - -
    -
    -
    -
    -11
    -12
    -13
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 11
    -
    -def to_proc
    -  self
    -end
    -
    -
    - -
    -

    - - #yield(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -7
    -8
    -9
    -
    -
    # File 'mrbgems/mruby-proc-ext/mrblib/proc.rb', line 7
    -
    -def yield(*args)
    -  call(*args)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Range.html b/docs/api/Range.html deleted file mode 100644 index 3b16602..0000000 --- a/docs/api/Range.html +++ /dev/null @@ -1,1062 +0,0 @@ - - - - - - - Class: Range - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Range - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/range.rb,
    - mrbgems/mruby-range-ext/mrblib/range.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    Range

    - -

    ISO 15.2.14

    - - -
    -
    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - -
      - -
    • - - - #each(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      Calls the given block for each element of self and pass the respective element.

      -
      - -
    • - - -
    • - - - #first(*args) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: rng.first -> obj rng.first(n) -> an_array.

      -
      - -
    • - - -
    • - - - #hash ⇒ Object - - - - - - - - - - - - - -
      -

      redefine #hash 15.3.1.3.15.

      -
      - -
    • - - -
    • - - - #last(*args) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: rng.last -> obj rng.last(n) -> an_array.

      -
      - -
    • - - -
    • - - - #max(&block) ⇒ Object - - - - - - - - - - - - - -
      - -
    • - - -
    • - - - #min(&block) ⇒ Object - - - - - - - - - - - - - -
      - -
    • - - -
    • - - - #overlap?(other) ⇒ Boolean - - - - - - - - - - - - - -
      -

      Compare two ranges and see if they overlap each other (1..5).overlap?(4..6) # => true (1..5).overlap?(7..9) # => false.

      -
      - -
    • - - -
    • - - - #to_a ⇒ Object - - - - (also: #entries) - - - - - - - - - - - -
      -

      call-seq: rng.to_a -> array rng.entries -> array.

      -
      - -
    • - - -
    - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #filter_map, #find_all, #find_index, #flat_map, #grep, #grep_v, #group_by, #include?, #inject, #lazy, #max_by, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block for each element of self and pass the respective element.

    - -

    ISO 15.2.14.4.4

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -
    -
    # File 'mrblib/range.rb', line 17
    -
    -def each(&block)
    -  return to_enum :each unless block
    -
    -  val = self.begin
    -  last = self.end
    -
    -  if val.kind_of?(Integer) && last.nil?
    -    i = val
    -    while true
    -      block.call(i)
    -      i += 1
    -    end
    -    return self
    -  end
    -
    -  if val.kind_of?(String) && last.nil?
    -    if val.respond_to? :__upto_endless
    -      return val.__upto_endless(&block)
    -    else
    -      str_each = true
    -    end
    -  end
    -
    -  if val.kind_of?(Integer) && last.kind_of?(Integer) # integers are special
    -    lim = last
    -    lim += 1 unless exclude_end?
    -    i = val
    -    while i < lim
    -      block.call(i)
    -      i += 1
    -    end
    -    return self
    -  end
    -
    -  if val.kind_of?(String) && last.kind_of?(String) # strings are special
    -    if val.respond_to? :upto
    -      return val.upto(last, exclude_end?, &block)
    -    else
    -      str_each = true
    -    end
    -  end
    -
    -  raise TypeError, "can't iterate" unless val.respond_to? :succ
    -
    -  return self if (val <=> last) > 0
    -
    -  while (val <=> last) < 0
    -    block.call(val)
    -    val = val.succ
    -    if str_each
    -      break if val.size > last.size
    -    end
    -  end
    -
    -  block.call(val) if !exclude_end? && (val <=> last) == 0
    -  self
    -end
    -
    -
    - -
    -

    - - #first(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: rng.first -> obj rng.first(n) -> an_array

    - -

    Returns the first object in the range, or an array of the first n elements.

    - -

    (10..20).first #=> 10 (10..20).first(3) #=> [10, 11, 12]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -
    -
    # File 'mrbgems/mruby-range-ext/mrblib/range.rb', line 13
    -
    -def first(*args)
    -  raise RangeError, "cannot get the first element of beginless range" if self.begin.nil?
    -  return self.begin if args.empty?
    -
    -  raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 1)" unless args.length == 1
    -  nv = args[0]
    -  n = nv.__to_int
    -  raise ArgumentError, "negative array size (or size too big)" unless 0 <= n
    -  ary = []
    -  each do |i|
    -    break if n <= 0
    -    ary.push(i)
    -    n -= 1
    -  end
    -  ary
    -end
    -
    -
    - -
    -

    - - #hashObject - - - - - -

    -
    - -

    redefine #hash 15.3.1.3.15

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -76
    -77
    -78
    -79
    -80
    -
    -
    # File 'mrblib/range.rb', line 76
    -
    -def hash
    -  h = first.hash ^ last.hash
    -  h += 1 if self.exclude_end?
    -  h
    -end
    -
    -
    - -
    -

    - - #last(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: rng.last -> obj rng.last(n) -> an_array

    - -

    Returns the last object in the range, or an array of the last n elements.

    - -

    Note that with no arguments last will return the object that defines the end of the range even if #exclude_end? is true.

    - -

    (10..20).last #=> 20 (10…20).last #=> 20 (10..20).last(3) #=> [18, 19, 20] (10…20).last(3) #=> [17, 18, 19]

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -45
    -46
    -47
    -48
    -49
    -50
    -51
    -52
    -53
    -54
    -
    -
    # File 'mrbgems/mruby-range-ext/mrblib/range.rb', line 45
    -
    -def last(*args)
    -  raise RangeError, "cannot get the last element of endless range" if self.end.nil?
    -  return self.end if args.empty?
    -
    -  raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 1)" unless args.length == 1
    -  nv = args[0]
    -  n = nv.__to_int
    -  raise ArgumentError, "negative array size (or size too big)" unless 0 <= n
    -  return self.to_a.last(nv)
    -end
    -
    -
    - -
    -

    - - #max(&block) ⇒ Object - - - - - -

    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -
    -
    # File 'mrbgems/mruby-range-ext/mrblib/range.rb', line 56
    -
    -def max(&block)
    -  val = self.begin
    -  last = self.end
    -  return super(&block) if block
    -
    -  raise RangeError, "cannot get the maximum of endless range" if last.nil?
    -
    -  # fast path for numerics
    -  if val.kind_of?(Numeric) && last.kind_of?(Numeric)
    -    raise TypeError if exclude_end? && !last.kind_of?(Integer)
    -    return nil if val > last
    -    return nil if val == last && exclude_end?
    -
    -    max = last
    -    max -= 1 if exclude_end?
    -    return max
    -  end
    -
    -  # delegate to Enumerable
    -  super()
    -end
    -
    -
    - -
    -

    - - #min(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    -89
    -90
    -91
    -92
    -93
    -94
    -95
    -96
    -97
    -98
    -
    -
    # File 'mrbgems/mruby-range-ext/mrblib/range.rb', line 78
    -
    -def min(&block)
    -  val = self.begin
    -  last = self.end
    -  if block
    -    raise RangeError, "cannot get the minimum of endless range with custom comparison method" if last.nil?
    -    return super(&block)
    -  end
    -  return val if last.nil?
    -
    -  # fast path for numerics
    -  if val.kind_of?(Numeric) && last.kind_of?(Numeric)
    -    return nil if val > last
    -    return nil if val == last && exclude_end?
    -
    -    min = val
    -    return min
    -  end
    -
    -  # delegate to Enumerable
    -  super()
    -end
    -
    -
    - -
    -

    - - #overlap?(other) ⇒ Boolean - - - - - -

    -
    - -

    Compare two ranges and see if they overlap each other (1..5).overlap?(4..6) # => true (1..5).overlap?(7..9) # => false

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -103
    -104
    -105
    -106
    -107
    -108
    -109
    -110
    -111
    -112
    -113
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -
    -
    # File 'mrbgems/mruby-range-ext/mrblib/range.rb', line 103
    -
    -def overlap?(other)
    -  raise TypeError, "argument must be a range" unless other.kind_of?(Range)
    -
    -  self_begin = self.begin
    -  other_end = other.end
    -  other_excl = other.exclude_end?
    -
    -  return false if __empty_range?(self_begin, other_end, other_excl)
    -
    -  other_begin = other.begin
    -  self_end = self.end
    -  self_excl = self.exclude_end?
    -
    -  return false if __empty_range?(other_begin, self_end, self_excl)
    -  return true if self_begin == other_begin
    -
    -  return false if __empty_range?(self_begin, self_end, self_excl)
    -  return false if __empty_range?(other_begin, other_end, other_excl)
    -
    -  true
    -end
    -
    -
    - -
    -

    - - #to_aObject - - - - Also known as: - entries - - - - -

    -
    - -

    call-seq: rng.to_a -> array rng.entries -> array

    - -

    Returns an array containing the items in the range.

    - -

    (1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7] (1..).to_a #=> RangeError: cannot convert endless range to an array

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -91
    -92
    -93
    -94
    -95
    -
    -
    # File 'mrblib/range.rb', line 91
    -
    -def to_a
    -  a = __num_to_a
    -  return a if a
    -  super
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/RangeError.html b/docs/api/RangeError.html deleted file mode 100644 index 29a6f1b..0000000 --- a/docs/api/RangeError.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - Exception: RangeError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: RangeError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.26

    - - -
    -
    -
    - - -
    - -
    -

    Direct Known Subclasses

    -

    FloatDomainError

    -
    - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Rational.html b/docs/api/Rational.html deleted file mode 100644 index 6dce061..0000000 --- a/docs/api/Rational.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - Class: Rational - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Rational - - - -

    -
    - -
    -
    Inherits:
    -
    - Numeric - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-rational/mrblib/rational.rb
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from Numeric

    -

    #+@, #-@, #abs, #integer?, #negative?, #nonzero?, #positive?, #to_c, #to_r, #zero?

    - - - - - - - - - -

    Methods included from Comparable

    -

    #<, #<=, #==, #>, #>=, #between?, #clamp

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #<=>(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -10
    -11
    -12
    -13
    -14
    -15
    -
    -
    # File 'mrbgems/mruby-rational/mrblib/rational.rb', line 10
    -
    -def <=>(other)
    -  return nil unless other.kind_of?(Numeric)
    -  self.to_f <=> other.to_f
    -rescue
    -  nil
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-rational/mrblib/rational.rb', line 2
    -
    -def inspect
    -  "(#{to_s})"
    -end
    -
    -
    - -
    -

    - - #to_sObject - - - - - -

    - - - - -
    -
    -
    -
    -6
    -7
    -8
    -
    -
    # File 'mrbgems/mruby-rational/mrblib/rational.rb', line 6
    -
    -def to_s
    -  "#{numerator}/#{denominator}"
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/RegexpError.html b/docs/api/RegexpError.html deleted file mode 100644 index 797b4a3..0000000 --- a/docs/api/RegexpError.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Exception: RegexpError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: RegexpError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.26

    - - -
    -
    -
    - - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Set.html b/docs/api/Set.html deleted file mode 100644 index 2d2e221..0000000 --- a/docs/api/Set.html +++ /dev/null @@ -1,3239 +0,0 @@ - - - - - - - Class: Set - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Set - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-set/mrblib/set.rb
    -
    - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(enum = nil, &block) ⇒ Set - - - - - -

    -
    - -

    Returns a new instance of Set.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 22
    -
    -def initialize(enum = nil, &block)
    -  @hash ||= Hash.new
    -
    -  enum.nil? and return
    -
    -  if block_given?
    -    __do_with_enum(enum) { |o| add(block.call(o)) }
    -  else
    -    merge(enum)
    -  end
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .[](*ary) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -18
    -19
    -20
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 18
    -
    -def self.[](*ary)
    -  new(ary)
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #&(enum) ⇒ Object - - - - Also known as: - intersection - - - - -

    - - - - -
    -
    -
    -
    -241
    -242
    -243
    -244
    -245
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 241
    -
    -def &(enum)
    -  n = Set.new
    -  __do_with_enum(enum) { |o| n.add(o) if include?(o) }
    -  n
    -end
    -
    -
    - -
    -

    - - #-(enum) ⇒ Object - - - - Also known as: - difference - - - - -

    - - - - -
    -
    -
    -
    -236
    -237
    -238
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 236
    -
    -def -(enum)
    -  dup.subtract(enum)
    -end
    -
    -
    - -
    -

    - - #<=>(set) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -264
    -265
    -266
    -267
    -268
    -269
    -270
    -271
    -272
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 264
    -
    -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
    -
    -
    - -
    -

    - - #==(other) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -252
    -253
    -254
    -255
    -256
    -257
    -258
    -259
    -260
    -261
    -262
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 252
    -
    -def ==(other)
    -  if self.equal?(other)
    -    true
    -  elsif other.instance_of?(self.class) && self.size == other.size
    -    @hash == other.__get_hash
    -  elsif other.is_a?(self.class) && self.size == other.size
    -    other.all? { |o| include?(o) }
    -  else
    -    false
    -  end
    -end
    -
    -
    - -
    -

    - - #^(enum) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -248
    -249
    -250
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 248
    -
    -def ^(enum)
    -  (self | Set.new(enum)) - (self & Set.new(enum))
    -end
    -
    -
    - -
    -

    - - #__do_with_enum(enum, &block) ⇒ Object - - - - - -

    -
    - -

    internal method

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -5
    -6
    -7
    -8
    -9
    -10
    -11
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 5
    -
    -def __do_with_enum(enum, &block)
    -  if enum.respond_to?(:each)
    -    enum.each(&block)
    -  else
    -    raise ArgumentError, "value must be enumerable"
    -  end
    -end
    -
    -
    - -
    -

    - - #__get_hashObject - - - - - -

    -
    - -

    internal method to get internal hash

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -14
    -15
    -16
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 14
    -
    -def __get_hash
    -  @hash
    -end
    -
    -
    - -
    -

    - - #add(o) ⇒ Object - - - - Also known as: - << - - - - -

    - - - - -
    -
    -
    -
    -153
    -154
    -155
    -156
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 153
    -
    -def add(o)
    -  @hash[o] = true
    -  self
    -end
    -
    -
    - -
    -

    - - #add?(o) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -159
    -160
    -161
    -162
    -163
    -164
    -165
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 159
    -
    -def add?(o)
    -  if include?(o)
    -    nil
    -  else
    -    add(o)
    -  end
    -end
    -
    -
    - -
    -

    - - #classifyObject - - - - - -

    - - - - -
    -
    -
    -
    -283
    -284
    -285
    -286
    -287
    -288
    -289
    -290
    -291
    -292
    -293
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 283
    -
    -def classify
    -  return to_enum :classify unless block_given?
    -  h = {}
    -
    -  each { |i|
    -    x = yield(i)
    -    (h[x] ||= self.class.new).add(i)
    -  }
    -
    -  h
    -end
    -
    -
    - -
    -

    - - #clearObject - - - - - -

    - - - - -
    -
    -
    -
    -53
    -54
    -55
    -56
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 53
    -
    -def clear
    -  @hash.clear
    -  self
    -end
    -
    -
    - -
    -

    - - #collect!Object - - - - Also known as: - map! - - - - -

    - - - - -
    -
    -
    -
    -192
    -193
    -194
    -195
    -196
    -197
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 192
    -
    -def collect!
    -  return to_enum :collect! unless block_given?
    -  set = self.class.new
    -  each { |o| set << yield(o) }
    -  replace(set)
    -end
    -
    -
    - -
    -

    - - #delete(o) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -167
    -168
    -169
    -170
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 167
    -
    -def delete(o)
    -  @hash.delete(o)
    -  self
    -end
    -
    -
    - -
    -

    - - #delete?(o) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 172
    -
    -def delete?(o)
    -  if include?(o)
    -    delete(o)
    -  else
    -    nil
    -  end
    -end
    -
    -
    - -
    -

    - - #delete_ifObject - - - - - -

    - - - - -
    -
    -
    -
    -180
    -181
    -182
    -183
    -184
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 180
    -
    -def delete_if
    -  return to_enum :delete_if unless block_given?
    -  select { |o| yield o }.each { |o| @hash.delete(o) }
    -  self
    -end
    -
    -
    - -
    -

    - - #disjoint?(set) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -143
    -144
    -145
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 143
    -
    -def disjoint?(set)
    -  !intersect?(set)
    -end
    -
    -
    - -
    -

    - - #divide(&func) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -295
    -296
    -297
    -298
    -299
    -300
    -301
    -302
    -303
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 295
    -
    -def divide(&func)
    -  return to_enum :divide unless block_given?
    -
    -  if func.arity == 2
    -    raise NotImplementedError, "Set#divide with 2 arity block is not implemented."
    -  end
    -
    -  Set.new(classify(&func).values)
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -147
    -148
    -149
    -150
    -151
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 147
    -
    -def each(&block)
    -  return to_enum :each unless block_given?
    -  @hash.each_key(&block)
    -  self
    -end
    -
    -
    - -
    -

    - - #empty?Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -49
    -50
    -51
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 49
    -
    -def empty?
    -  @hash.empty?
    -end
    -
    -
    - -
    -

    - - #eql?(o) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -278
    -279
    -280
    -281
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 278
    -
    -def eql?(o)
    -  return false unless o.is_a?(Set)
    -  @hash.eql?(o.__get_hash)
    -end
    -
    -
    - -
    -

    - - #flattenObject - - - - - -

    - - - - -
    -
    -
    -
    -88
    -89
    -90
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 88
    -
    -def flatten
    -  self.class.new.flatten_merge(self)
    -end
    -
    -
    - -
    -

    - - #flatten!Object - - - - - -

    - - - - -
    -
    -
    -
    -92
    -93
    -94
    -95
    -96
    -97
    -98
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 92
    -
    -def flatten!
    -  if detect { |e| e.is_a?(Set) }
    -    replace(flatten())
    -  else
    -    nil
    -  end
    -end
    -
    -
    - -
    -

    - - #flatten_merge(set, seen = Set.new) ⇒ Object - - - - - -

    -
    - -

    def to_set end

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 70
    -
    -def flatten_merge(set, seen = Set.new)
    -  seen.add(set.object_id)
    -  set.each { |e|
    -    if e.is_a?(Set)
    -      if seen.include?(e_id = e.object_id)
    -        raise ArgumentError, "tried to flatten recursive Set"
    -      end
    -
    -      flatten_merge(e, seen)
    -    else
    -      add(e)
    -    end
    -  }
    -  seen.delete(set.object_id)
    -
    -  self
    -end
    -
    -
    - -
    -

    - - #hashObject - - - - - -

    - - - - -
    -
    -
    -
    -274
    -275
    -276
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 274
    -
    -def hash
    -  @hash.hash
    -end
    -
    -
    - -
    -

    - - #include?(o) ⇒ Boolean - - - - Also known as: - member?, === - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -100
    -101
    -102
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 100
    -
    -def include?(o)
    -  @hash.include?(o)
    -end
    -
    -
    - -
    -

    - - #initialize_copy(orig) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -34
    -35
    -36
    -37
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 34
    -
    -def initialize_copy(orig)
    -  super
    -  @hash = orig.__get_hash.dup
    -end
    -
    -
    - -
    -

    - - #inspectObject - - - - Also known as: - to_s - - - - -

    - - - - -
    -
    -
    -
    -309
    -310
    -311
    -312
    -313
    -314
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 309
    -
    -def inspect
    -  return "#<#{self.class}: {}>" if empty?
    -  return "#<#{self.class}: {...}>" if self.__inspect_recursive?
    -  ary = map {|o| o.inspect }
    -  "#<#{self.class}: {#{ary.join(", ")}}>"
    -end
    -
    -
    - -
    -

    - - #intersect?(set) ⇒ Boolean - - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -134
    -135
    -136
    -137
    -138
    -139
    -140
    -141
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 134
    -
    -def intersect?(set)
    -  raise ArgumentError, "value must be a set" unless set.is_a?(Set)
    -  if size < set.size
    -    any? { |o| set.include?(o) }
    -  else
    -    set.any? { |o| include?(o) }
    -  end
    -end
    -
    -
    - -
    -

    - - #join(separator = nil) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -305
    -306
    -307
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 305
    -
    -def join(separator = nil)
    -  to_a.join(separator)
    -end
    -
    -
    - -
    -

    - - #keep_ifObject - - - - - -

    - - - - -
    -
    -
    -
    -186
    -187
    -188
    -189
    -190
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 186
    -
    -def keep_if
    -  return to_enum :keep_if unless block_given?
    -  reject { |o| yield o }.each { |o| @hash.delete(o) }
    -  self
    -end
    -
    -
    - -
    -

    - - #merge(enum) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
    -223
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 215
    -
    -def merge(enum)
    -  if enum.instance_of?(self.class)
    -    @hash.merge!(enum.__get_hash)
    -  else
    -    __do_with_enum(enum) { |o| add(o) }
    -  end
    -
    -  self
    -end
    -
    -
    - -
    -

    - - #proper_subset?(set) ⇒ Boolean - - - - Also known as: - < - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -127
    -128
    -129
    -130
    -131
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 127
    -
    -def proper_subset?(set)
    -  raise ArgumentError, "value must be a set" unless set.is_a?(Set)
    -  return false if set.size <= size
    -  all? { |o| set.include?(o) }
    -end
    -
    -
    - -
    -

    - - #proper_superset?(set) ⇒ Boolean - - - - Also known as: - > - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -113
    -114
    -115
    -116
    -117
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 113
    -
    -def proper_superset?(set)
    -  raise ArgumentError, "value must be a set" unless set.is_a?(Set)
    -  return false if size <= set.size
    -  set.all? { |o| include?(o) }
    -end
    -
    -
    - -
    -

    - - #reject!(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -200
    -201
    -202
    -203
    -204
    -205
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 200
    -
    -def reject!(&block)
    -  return to_enum :reject! unless block_given?
    -  n = size
    -  delete_if(&block)
    -  size == n ? nil : self
    -end
    -
    -
    - -
    -

    - - #replace(enum) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -58
    -59
    -60
    -61
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 58
    -
    -def replace(enum)
    -  clear
    -  merge(enum)
    -end
    -
    -
    - -
    -

    - - #resetObject - - - - - -

    - - - - -
    -
    -
    -
    -318
    -319
    -320
    -321
    -322
    -323
    -324
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 318
    -
    -def reset
    -  if frozen?
    -    raise FrozenError, "can't modify frozen Set"
    -  else
    -    @hash.rehash
    -  end
    -end
    -
    -
    - -
    -

    - - #select!(&block) ⇒ Object - - - - Also known as: - filter! - - - - -

    - - - - -
    -
    -
    -
    -207
    -208
    -209
    -210
    -211
    -212
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 207
    -
    -def select!(&block)
    -  return to_enum :select! unless block_given?
    -  n = size
    -  keep_if(&block)
    -  size == n ? nil : self
    -end
    -
    -
    - -
    -

    - - #sizeObject - - - - Also known as: - length - - - - -

    -
    - -

    def freeze @hash.freeze super end

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -44
    -45
    -46
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 44
    -
    -def size
    -  @hash.size
    -end
    -
    -
    - -
    -

    - - #subset?(set) ⇒ Boolean - - - - Also known as: - <= - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -120
    -121
    -122
    -123
    -124
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 120
    -
    -def subset?(set)
    -  raise ArgumentError, "value must be a set" unless set.is_a?(Set)
    -  return false if set.size < size
    -  all? { |o| set.include?(o) }
    -end
    -
    -
    - -
    -

    - - #subtract(enum) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -225
    -226
    -227
    -228
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 225
    -
    -def subtract(enum)
    -  __do_with_enum(enum) { |o| delete(o) }
    -  self
    -end
    -
    -
    - -
    -

    - - #superset?(set) ⇒ Boolean - - - - Also known as: - >= - - - - -

    -
    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -106
    -107
    -108
    -109
    -110
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 106
    -
    -def superset?(set)
    -  raise ArgumentError, "value must be a set" unless set.is_a?(Set)
    -  return false if size < set.size
    -  set.all? { |o| include?(o) }
    -end
    -
    -
    - -
    -

    - - #to_aObject - - - - - -

    - - - - -
    -
    -
    -
    -63
    -64
    -65
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 63
    -
    -def to_a
    -  @hash.keys
    -end
    -
    -
    - -
    -

    - - #|(enum) ⇒ Object - - - - Also known as: - +, union - - - - -

    - - - - -
    -
    -
    -
    -230
    -231
    -232
    -
    -
    # File 'mrbgems/mruby-set/mrblib/set.rb', line 230
    -
    -def |(enum)
    -  dup.merge(enum)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Socket.html b/docs/api/Socket.html deleted file mode 100644 index 82ab76f..0000000 --- a/docs/api/Socket.html +++ /dev/null @@ -1,1117 +0,0 @@ - - - - - - - Class: Socket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Socket - - - -

    -
    - -
    -
    Inherits:
    -
    - BasicSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(domain, type, protocol = 0) ⇒ Socket - - - - - -

    -
    - -

    Returns a new instance of Socket.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -353
    -354
    -355
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 353
    -
    -def initialize(domain, type, protocol=0)
    -  super(Socket._socket(domain, type, protocol), "r+")
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .getaddrinfo(nodename, servname, family = nil, socktype = nil, protocol = nil, flags = 0) ⇒ Object - - - - - -

    -
    - -

    def self.accept_loop

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -359
    -360
    -361
    -362
    -363
    -364
    -365
    -366
    -367
    -368
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 359
    -
    -def self.getaddrinfo(nodename, servname, family=nil, socktype=nil, protocol=nil, flags=0)
    -  Addrinfo.getaddrinfo(nodename, servname, family, socktype, protocol, flags).map { |ai|
    -    ary = ai._to_array
    -    ary[2] = nodename
    -    ary[4] = ai.afamily
    -    ary[5] = ai.socktype
    -    ary[6] = ai.protocol
    -    ary
    -  }
    -end
    -
    -
    - -
    -

    - - .open(*args) ⇒ Object - - - - - -

    -
    - -

    def self.getnameinfo def self.ip_address_list

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -373
    -374
    -375
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 373
    -
    -def self.open(*args)
    -  new(args)
    -end
    -
    -
    - -
    -

    - - .sockaddr_in(port, host) ⇒ Object - - - - Also known as: - pack_sockaddr_in - - - - -

    - - - - -
    -
    -
    -
    -377
    -378
    -379
    -380
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 377
    -
    -def self.sockaddr_in(port, host)
    -  ai = Addrinfo.getaddrinfo(host, port, nil, Socket::SOCK_DGRAM)[0]
    -  ai.to_sockaddr
    -end
    -
    -
    - -
    -

    - - .unpack_sockaddr_in(sa) ⇒ Object - - - - - -

    -
    - -

    def self.tcp def self.tcp_server_loop def self.tcp_server_sockets def self.udp_server_loop def self.udp_server_loop_on def self.udp_server_recv def self.udp_server_sockets def self.unix(path) def self.unix_server_loop def self.unix_server_socket

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -393
    -394
    -395
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 393
    -
    -def self.unpack_sockaddr_in(sa)
    -  Addrinfo.new(sa).ip_unpack.reverse
    -end
    -
    -
    - -
    -

    - - .unpack_sockaddr_un(sa) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -397
    -398
    -399
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 397
    -
    -def self.unpack_sockaddr_un(sa)
    -  Addrinfo.new(sa).unix_path
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #acceptObject - - - - - -

    - - - - -
    -
    -
    -
    -407
    -408
    -409
    -410
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 407
    -
    -def accept
    -  fd, addr = self.sysaccept
    -  [ Socket.for_fd(fd), addr ]
    -end
    -
    -
    - -
    -

    - - #accept_nonblockObject - - - - - -

    - - - - -
    -
    -
    -
    -412
    -413
    -414
    -415
    -416
    -417
    -418
    -419
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 412
    -
    -def accept_nonblock
    -  begin
    -    self._setnonblock(true)
    -    self.accept
    -  ensure
    -    self._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #bind(sockaddr) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -421
    -422
    -423
    -424
    -425
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 421
    -
    -def bind(sockaddr)
    -  sockaddr = sockaddr.to_sockaddr if sockaddr.is_a? Addrinfo
    -  Socket._bind(self.fileno, sockaddr)
    -  0
    -end
    -
    -
    - -
    -

    - - #connect(sockaddr) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -427
    -428
    -429
    -430
    -431
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 427
    -
    -def connect(sockaddr)
    -  sockaddr = sockaddr.to_sockaddr if sockaddr.is_a? Addrinfo
    -  Socket._connect(self.fileno, sockaddr)
    -  0
    -end
    -
    -
    - -
    -

    - - #connect_nonblock(sockaddr) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -433
    -434
    -435
    -436
    -437
    -438
    -439
    -440
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 433
    -
    -def connect_nonblock(sockaddr)
    -  begin
    -    self._setnonblock(true)
    -    self.connect(sockaddr)
    -  ensure
    -    self._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #listen(backlog) ⇒ Object - - - - - -

    -
    - -

    def ipv6only!

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -444
    -445
    -446
    -447
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 444
    -
    -def listen(backlog)
    -  Socket._listen(self.fileno, backlog)
    -  0
    -end
    -
    -
    - -
    -

    - - #recvfrom(maxlen, flags = 0) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -449
    -450
    -451
    -452
    -453
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 449
    -
    -def recvfrom(maxlen, flags=0)
    -  msg, sa = _recvfrom(maxlen, flags)
    -  socktype = self.getsockopt(Socket::SOL_SOCKET, Socket::SO_TYPE).int
    -  [ msg, Addrinfo.new(sa, Socket::PF_UNSPEC, socktype) ]
    -end
    -
    -
    - -
    -

    - - #recvfrom_nonblock(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -455
    -456
    -457
    -458
    -459
    -460
    -461
    -462
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 455
    -
    -def recvfrom_nonblock(*args)
    -  begin
    -    self._setnonblock(true)
    -    self._recvfrom(*args)
    -  ensure
    -    self._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #sysacceptObject - - - - - -

    - - - - -
    -
    -
    -
    -464
    -465
    -466
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 464
    -
    -def sysaccept
    -  Socket._accept2(self.fileno)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/SocketError.html b/docs/api/SocketError.html deleted file mode 100644 index 77b9349..0000000 --- a/docs/api/SocketError.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - Exception: SocketError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: SocketError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/StopIteration.html b/docs/api/StopIteration.html deleted file mode 100644 index 5d4f5a6..0000000 --- a/docs/api/StopIteration.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - Exception: StopIteration - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: StopIteration - - - -

    -
    - -
    -
    Inherits:
    -
    - IndexError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - - - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #result ⇒ Object - - - - - - - - - - - - - - - - -
      -

      Returns the value of attribute result.

      -
      - -
    • - - -
    - - - - - - - - - - - - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #resultObject - - - - - -

    -
    - -

    Returns the value of attribute result.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -75
    -76
    -77
    -
    -
    # File 'mrblib/10error.rb', line 75
    -
    -def result
    -  @result
    -end
    -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/String.html b/docs/api/String.html deleted file mode 100644 index 34b7ccb..0000000 --- a/docs/api/String.html +++ /dev/null @@ -1,2828 +0,0 @@ - - - - - - - Class: String - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: String - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Comparable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/string.rb,
    - mrbgems/mruby-sprintf/mrblib/string.rb,
    mrbgems/mruby-string-ext/mrblib/string.rb
    -
    -
    - -
    - -

    Overview

    -
    - -

    String

    - -

    ISO 15.2.10

    - - -
    -
    -
    - - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Comparable

    -

    #<, #<=, #==, #>, #>=, #between?, #clamp

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #%(args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -
    -
    # File 'mrbgems/mruby-sprintf/mrblib/string.rb', line 2
    -
    -def %(args)
    -  if args.is_a? Array
    -    sprintf(self, *args)
    -  else
    -    sprintf(self, args)
    -  end
    -end
    -
    -
    - -
    -

    - - #__upto_endless(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -442
    -443
    -444
    -445
    -446
    -447
    -448
    -449
    -450
    -451
    -452
    -453
    -454
    -455
    -456
    -457
    -458
    -459
    -460
    -461
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 442
    -
    -def __upto_endless(&block)
    -  len = self.length
    -  # both edges are all digits
    -  bi = self.to_i(10)
    -  if bi > 0 or bi == "0"*len
    -    while true
    -      s = bi.to_s
    -      s = s.rjust(len, "0") if s.length < len
    -      yield s
    -      bi += 1
    -    end
    -    return self
    -  end
    -  bs = self
    -  while true
    -    yield bs
    -    bs = bs.succ
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #center(width, padstr = ' ') ⇒ Object - - - - - -

    -
    - -

    call-seq: str.center(width, padstr=‘ ’) -> new_str

    - -

    Centers str in width. If width is greater than the length of str, returns a new String of length width with str centered and padded with padstr; otherwise, returns str.

    - -
    "hello".center(4)         #=> "hello"
    -"hello".center(20)        #=> "       hello        "
    -"hello".center(20, '123') #=> "1231231hello12312312"
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -283
    -284
    -285
    -286
    -287
    -288
    -289
    -290
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 283
    -
    -def center(width, padstr = ' ')
    -  raise ArgumentError, 'zero width padding' if padstr == ''
    -  return self if width <= self.size
    -  width -= self.size
    -  pad1 = width / 2
    -  pad2 = width - pad1
    -  (padstr*pad1)[0,pad1] + self + (padstr*pad2)[0,pad2]
    -end
    -
    -
    - -
    -

    - - #chars(&block) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -292
    -293
    -294
    -295
    -296
    -297
    -298
    -299
    -300
    -301
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 292
    -
    -def chars(&block)
    -  if block_given?
    -    self.split('').each do |i|
    -      block.call(i)
    -    end
    -    self
    -  else
    -    self.split('')
    -  end
    -end
    -
    -
    - -
    -

    - - #clearObject - - - - - -

    -
    - -

    call-seq: string.clear -> string

    - -

    Makes string empty.

    - -

    a = “abcde” a.clear #=> “”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -12
    -13
    -14
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 12
    -
    -def clear
    -  self.replace("")
    -end
    -
    -
    - -
    -

    - - #codepoints(&block) ⇒ Object - - - - Also known as: - each_codepoint - - - - -

    - - - - -
    -
    -
    -
    -316
    -317
    -318
    -319
    -320
    -321
    -322
    -323
    -324
    -325
    -326
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 316
    -
    -def codepoints(&block)
    -  cp = __codepoints()
    -  if block_given?
    -    cp.each do|x|
    -      block.call(x)
    -    end
    -    self
    -  else
    -    cp
    -  end
    -end
    -
    -
    - -
    -

    - - #each_byte(&block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each byte of self.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -
    -
    # File 'mrblib/string.rb', line 151
    -
    -def each_byte(&block)
    -  return to_enum(:each_byte, &block) unless block
    -  pos = 0
    -  while pos < bytesize
    -    block.call(getbyte(pos))
    -    pos += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_char(&block) ⇒ Object - - - - - -

    -
    - -

    Call the given block for each character of self.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -306
    -307
    -308
    -309
    -310
    -311
    -312
    -313
    -314
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 306
    -
    -def each_char(&block)
    -  return to_enum :each_char unless block
    -  pos = 0
    -  while pos < self.size
    -    block.call(self[pos])
    -    pos += 1
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #each_line(separator = "\n", &block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block for each line and pass the respective line.

    - -

    ISO 15.2.10.5.15

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    -35
    -36
    -37
    -38
    -39
    -40
    -41
    -42
    -43
    -
    -
    # File 'mrblib/string.rb', line 14
    -
    -def each_line(separator = "\n", &block)
    -  return to_enum(:each_line, separator) unless block
    -
    -  if separator.nil?
    -    block.call(self)
    -    return self
    -  end
    -  raise TypeError unless separator.is_a?(String)
    -
    -  paragraph_mode = false
    -  if separator.empty?
    -    paragraph_mode = true
    -    separator = "\n\n"
    -  end
    -  start = 0
    -  string = dup
    -  self_len = self.bytesize
    -  sep_len = separator.bytesize
    -
    -  while (pointer = string.byteindex(separator, start))
    -    pointer += sep_len
    -    pointer += 1 while paragraph_mode && string.getbyte(pointer) == 10 # 10 == \n
    -    block.call(string.byteslice(start, pointer - start))
    -    start = pointer
    -  end
    -  return self if start == self_len
    -
    -  block.call(string.byteslice(start, self_len - start))
    -  self
    -end
    -
    -
    - -
    -

    - - #gsub(*args, &block) ⇒ Object - - - - - -

    -
    - -

    Replace all matches of pattern with replacement. Call block (if given) for each match and replace pattern with the value of the block. Return the final value.

    - -

    ISO 15.2.10.5.18

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -52
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    -77
    -78
    -
    -
    # File 'mrblib/string.rb', line 52
    -
    -def gsub(*args, &block)
    -  return to_enum(:gsub, *args) if args.length == 1 && !block
    -  raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 1..2)" unless (1..2).include?(args.length)
    -
    -  pattern, replace = *args
    -  plen = pattern.length
    -  if args.length == 2 && block
    -    block = nil
    -  end
    -  offset = 0
    -  result = []
    -  while found = self.byteindex(pattern, offset)
    -    result << self.byteslice(offset, found - offset)
    -    offset = found + plen
    -    result << if block
    -      block.call(pattern).to_s
    -    else
    -      self.__sub_replace(replace, pattern, found)
    -    end
    -    if plen == 0
    -      result << self.byteslice(offset, 1)
    -      offset += 1
    -    end
    -  end
    -  result << self.byteslice(offset..-1) if offset < length
    -  result.join
    -end
    -
    -
    - -
    -

    - - #gsub!(*args, &block) ⇒ Object - - - - - -

    -
    - -

    Replace all matches of pattern with replacement. Call block (if given) for each match and replace pattern with the value of the block. Modify self with the final value.

    - -

    ISO 15.2.10.5.19

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -87
    -88
    -89
    -90
    -91
    -92
    -93
    -
    -
    # File 'mrblib/string.rb', line 87
    -
    -def gsub!(*args, &block)
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  return to_enum(:gsub!, *args) if args.length == 1 && !block
    -  str = self.gsub(*args, &block)
    -  return nil unless self.index(args[0])
    -  self.replace(str)
    -end
    -
    -
    - -
    -

    - - #insert(idx, str) ⇒ Object - - - - - -

    -
    - -

    call-seq: str.insert(index, other_str) -> str

    - -

    Inserts other_str before the character at the given index, modifying str. Negative indices count from the end of the string, and insert after the given character. The intent is insert aString so that it starts at the given index.

    - -
    "abcd".insert(0, 'X')    #=> "Xabcd"
    -"abcd".insert(3, 'X')    #=> "abcXd"
    -"abcd".insert(4, 'X')    #=> "abcdX"
    -"abcd".insert(-3, 'X')   #=> "abXcd"
    -"abcd".insert(-1, 'X')   #=> "abcdX"
    -
    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -224
    -225
    -226
    -227
    -228
    -229
    -230
    -231
    -232
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 224
    -
    -def insert(idx, str)
    -  if idx == -1
    -    return self << str
    -  elsif idx < 0
    -    idx += 1
    -  end
    -  self[idx, 0] = str
    -  self
    -end
    -
    -
    - -
    -

    - - #lines(&blk) ⇒ Object - - - - - -

    -
    - -

    call-seq: string.lines -> array of string string.lines {|s| block} -> array of string

    - -

    Returns strings per line;

    - -

    a = “abcndef” a.lines #=> [“abcn”, “def”]

    - -

    If a block is given, it works the same as each_line.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -358
    -359
    -360
    -361
    -362
    -363
    -364
    -365
    -366
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 358
    -
    -def lines(&blk)
    -  lines = self.__lines
    -  if blk
    -    lines.each do |line|
    -      blk.call(line)
    -    end
    -  end
    -  lines
    -end
    -
    -
    - -
    -

    - - #ljust(idx, padstr = ' ') ⇒ Object - - - - - -

    -
    - -

    call-seq: str.ljust(integer, padstr=‘ ’) -> new_str

    - -

    If integer is greater than the length of str, returns a new String of length integer with str left justified and padded with padstr; otherwise, returns str.

    - -
    "hello".ljust(4)            #=> "hello"
    -"hello".ljust(20)           #=> "hello               "
    -"hello".ljust(20, '1234')   #=> "hello123412341234123"
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -245
    -246
    -247
    -248
    -249
    -250
    -251
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 245
    -
    -def ljust(idx, padstr = ' ')
    -  raise ArgumentError, 'zero width padding' if padstr == ''
    -  return self if idx <= self.size
    -  pad_repetitions = idx / padstr.size
    -  padding = (padstr * pad_repetitions)[0, idx-self.size]
    -  self + padding
    -end
    -
    -
    - -
    -

    - - #lstripObject - - - - - -

    -
    - -

    call-seq: str.lstrip -> new_str

    - -

    Returns a copy of str with leading whitespace removed. See also String#rstrip and String#strip.

    - -

    “ hello ”.lstrip #=> “hello ” “hello”.lstrip #=> “hello”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -26
    -27
    -28
    -29
    -30
    -31
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 26
    -
    -def lstrip
    -  a = 0
    -  z = self.size - 1
    -  a += 1 while a <= z and " \f\n\r\t\v".include?(self[a])
    -  (z >= 0) ? self[a..z] : ""
    -end
    -
    -
    - -
    -

    - - #lstrip!Object - - - - - -

    -
    - -

    call-seq: str.lstrip! -> self or nil

    - -

    Removes leading whitespace from str, returning nil if no change was made. See also String#rstrip! and String#strip!.

    - -

    “ hello ”.lstrip #=> “hello ” “hello”.lstrip! #=> nil

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -78
    -79
    -80
    -81
    -82
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 78
    -
    -def lstrip!
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  s = self.lstrip
    -  (s == self) ? nil : self.replace(s)
    -end
    -
    -
    - -
    -

    - - #partition(sep) ⇒ Object - - - - - -

    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 114
    -
    -def partition(sep)
    -  raise TypeError, "type mismatch: #{sep.class} given" unless sep.is_a? String
    -  n = index(sep)
    -  unless n.nil?
    -    m = n + sep.size
    -    [ slice(0, n), sep, slice(m, size - m) ]
    -  else
    -    [ self[0..-1], "", "" ]
    -  end
    -end
    -
    -
    - -
    -

    - - #prepend(*args) ⇒ Object - - - - - -

    -
    - -

    call-seq: str.prepend(other_str) -> str

    - -

    Prepend—Prepend the given string to str.

    - -

    a = “world” a.prepend(“hello ”) #=> “hello world” a #=> “hello world”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -338
    -339
    -340
    -341
    -342
    -343
    -344
    -345
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 338
    -
    -def prepend(*args)
    -  len = args.size
    -  while len > 0
    -    len -= 1
    -    self[0, 0] = args[len]
    -  end
    -  self
    -end
    -
    -
    - -
    -

    - - #rjust(idx, padstr = ' ') ⇒ Object - - - - - -

    -
    - -

    call-seq: str.rjust(integer, padstr=‘ ’) -> new_str

    - -

    If integer is greater than the length of str, returns a new String of length integer with str right justified and padded with padstr; otherwise, returns str.

    - -
    "hello".rjust(4)            #=> "hello"
    -"hello".rjust(20)           #=> "               hello"
    -"hello".rjust(20, '1234')   #=> "123412341234123hello"
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -264
    -265
    -266
    -267
    -268
    -269
    -270
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 264
    -
    -def rjust(idx, padstr = ' ')
    -  raise ArgumentError, 'zero width padding' if padstr == ''
    -  return self if idx <= self.size
    -  pad_repetitions = idx / padstr.size
    -  padding = (padstr * pad_repetitions)[0, idx-self.size]
    -  padding + self
    -end
    -
    -
    - -
    -

    - - #rpartition(sep) ⇒ Object - - - - - -

    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -125
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -134
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 125
    -
    -def rpartition(sep)
    -  raise TypeError, "type mismatch: #{sep.class} given" unless sep.is_a? String
    -  n = rindex(sep)
    -  unless n.nil?
    -    m = n + sep.size
    -    [ slice(0, n), sep, slice(m, size - m) ]
    -  else
    -    [ "", "", self ]
    -  end
    -end
    -
    -
    - -
    -

    - - #rstripObject - - - - - -

    -
    - -

    call-seq: str.rstrip -> new_str

    - -

    Returns a copy of str with trailing whitespace removed. See also String#lstrip and String#strip.

    - -

    “ hello ”.rstrip #=> “ hello” “hello”.rstrip #=> “hello”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -43
    -44
    -45
    -46
    -47
    -48
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 43
    -
    -def rstrip
    -  a = 0
    -  z = self.size - 1
    -  z -= 1 while a <= z and " \f\n\r\t\v\0".include?(self[z])
    -  (z >= 0) ? self[a..z] : ""
    -end
    -
    -
    - -
    -

    - - #rstrip!Object - - - - - -

    -
    - -

    call-seq: str.rstrip! -> self or nil

    - -

    Removes trailing whitespace from str, returning nil if no change was made. See also String#lstrip! and String#strip!.

    - -

    “ hello ”.rstrip #=> “ hello” “hello”.rstrip! #=> nil

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -95
    -96
    -97
    -98
    -99
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 95
    -
    -def rstrip!
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  s = self.rstrip
    -  (s == self) ? nil : self.replace(s)
    -end
    -
    -
    - -
    -

    - - #slice!(arg1, arg2 = nil) ⇒ Object - - - - - -

    -
    - -

    call-seq: str.slice!(fixnum) -> new_str or nil str.slice!(fixnum, fixnum) -> new_str or nil str.slice!(range) -> new_str or nil str.slice!(other_str) -> new_str or nil

    - -

    Deletes the specified portion from str, and returns the portion deleted.

    - -

    string = “this is a string” string.slice!(2) #=> “i” string.slice!(3..6) #=> “ is ” string.slice!(“r”) #=> “r” string #=> “thsa sting”

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -182
    -183
    -184
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -193
    -194
    -195
    -196
    -197
    -198
    -199
    -200
    -201
    -202
    -203
    -204
    -205
    -206
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 152
    -
    -def slice!(arg1, arg2=nil)
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  raise ArgumentError, "wrong number of arguments (expected 1..2)" if arg1.nil? && arg2.nil?
    -
    -  if !arg1.nil? && !arg2.nil?
    -    idx = arg1
    -    idx += self.size if arg1 < 0
    -    if idx >= 0 && idx <= self.size && arg2 > 0
    -      str = self[idx, arg2]
    -    else
    -      return nil
    -    end
    -  else
    -    validated = false
    -    if arg1.kind_of?(Range)
    -      beg = arg1.begin
    -      ed = arg1.end
    -      beg += self.size if beg < 0
    -      ed += self.size if ed < 0
    -      ed -= 1 if arg1.exclude_end?
    -      validated = true
    -    elsif arg1.kind_of?(String)
    -      validated = true
    -    else
    -      idx = arg1
    -      idx += self.size if arg1 < 0
    -      validated = true if idx >=0 && arg1 < self.size
    -    end
    -    if validated
    -      str = self[arg1]
    -    else
    -      return nil
    -    end
    -  end
    -  unless str.nil? || str == ""
    -    if !arg1.nil? && !arg2.nil?
    -      idx = arg1 >= 0 ? arg1 : self.size+arg1
    -      str2 = self[0...idx] + self[idx+arg2..-1].to_s
    -    else
    -      if arg1.kind_of?(Range)
    -        idx = beg >= 0 ? beg : self.size+beg
    -        idx2 = ed>= 0 ? ed : self.size+ed
    -        str2 = self[0...idx] + self[idx2+1..-1].to_s
    -      elsif arg1.kind_of?(String)
    -        idx = self.index(arg1)
    -        str2 = self[0...idx] + self[idx+arg1.size..-1] unless idx.nil?
    -      else
    -        idx = arg1 >= 0 ? arg1 : self.size+arg1
    -        str2 = self[0...idx] + self[idx+1..-1].to_s
    -      end
    -    end
    -    self.replace(str2) unless str2.nil?
    -  end
    -  str
    -end
    -
    -
    - -
    -

    - - #stripObject - - - - - -

    -
    - -

    call-seq: str.strip -> new_str

    - -

    Returns a copy of str with leading and trailing whitespace removed.

    - -

    “ hello ”.strip #=> “hello” “tgoodbyern”.strip #=> “goodbye”

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 59
    -
    -def strip
    -  a = 0
    -  z = self.size - 1
    -  a += 1 while a <= z and " \f\n\r\t\v".include?(self[a])
    -  z -= 1 while a <= z and " \f\n\r\t\v\0".include?(self[z])
    -  (z >= 0) ? self[a..z] : ""
    -end
    -
    -
    - -
    -

    - - #strip!Object - - - - - -

    -
    - -

    call-seq: str.strip! -> str or nil

    - -

    Removes leading and trailing whitespace from str. Returns nil if str was not altered.

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -108
    -109
    -110
    -111
    -112
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 108
    -
    -def strip!
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  s = self.strip
    -  (s == self) ? nil : self.replace(s)
    -end
    -
    -
    - -
    -

    - - #sub(*args, &block) ⇒ Object - - - - - -

    -
    - -

    Replace only the first match of pattern with replacement. Call block (if given) for each match and replace pattern with the value of the block. Return the final value.

    - -

    ISO 15.2.10.5.36

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -112
    -113
    -114
    -115
    -116
    -117
    -118
    -119
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -
    -
    # File 'mrblib/string.rb', line 112
    -
    -def sub(*args, &block)
    -  unless (1..2).include?(args.length)
    -    raise ArgumentError, "wrong number of arguments (given #{args.length}, expected 2)"
    -  end
    -
    -  pattern, replace = *args
    -  if args.length == 2 && block
    -    block = nil
    -  end
    -  result = []
    -  found = self.index(pattern)
    -  return self.dup unless found
    -  result << self.byteslice(0, found)
    -  offset = found + pattern.length
    -  result << if block
    -    block.call(pattern).to_s
    -  else
    -    self.__sub_replace(replace, pattern, found)
    -  end
    -  result << self.byteslice(offset..-1) if offset < length
    -  result.join
    -end
    -
    -
    - -
    -

    - - #sub!(*args, &block) ⇒ Object - - - - - -

    -
    - -

    Replace only the first match of pattern with replacement. Call block (if given) for each match and replace pattern with the value of the block. Modify self with the final value.

    - -

    ISO 15.2.10.5.37

    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -142
    -143
    -144
    -145
    -146
    -147
    -
    -
    # File 'mrblib/string.rb', line 142
    -
    -def sub!(*args, &block)
    -  raise FrozenError, "can't modify frozen String" if frozen?
    -  str = self.sub(*args, &block)
    -  return nil unless self.index(args[0])
    -  self.replace(str)
    -end
    -
    -
    - -
    -

    - - #upto(max, exclusive = false, &block) ⇒ Object - - - - - -

    -
    - -

    call-seq: str.upto(other_str, exclusive=false) {|s| block } -> str str.upto(other_str, exclusive=false) -> an_enumerator

    - -

    Iterates through successive values, starting at str and ending at other_str inclusive, passing each value in turn to the block. The String#succ method is used to generate each value. If optional second argument exclusive is omitted or is false, the last value will be included; otherwise it will be excluded.

    - -

    If no block is given, an enumerator is returned instead.

    - -
    "a8".upto("b6") {|s| print s, ' ' }
    -for s in "a8".."b6"
    -  print s, ' '
    -end
    -
    - -

    produces:

    - -
    a8 a9 b0 b1 b2 b3 b4 b5 b6
    -a8 a9 b0 b1 b2 b3 b4 b5 b6
    -
    - -

    If str and other_str contains only ascii numeric characters, both are recognized as decimal numbers. In addition, the width of string (e.g. leading zeros) is handled appropriately.

    - -
    "9".upto("11").to_a   #=> ["9", "10", "11"]
    -"25".upto("5").to_a   #=> []
    -"07".upto("11").to_a  #=> ["07", "08", "09", "10", "11"]
    -
    - - -
    -
    -
    - -

    Raises:

    - - -
    - - - - - - -
    -
    -
    -
    -398
    -399
    -400
    -401
    -402
    -403
    -404
    -405
    -406
    -407
    -408
    -409
    -410
    -411
    -412
    -413
    -414
    -415
    -416
    -417
    -418
    -419
    -420
    -421
    -422
    -423
    -424
    -425
    -426
    -427
    -428
    -429
    -430
    -431
    -432
    -433
    -434
    -435
    -436
    -437
    -438
    -439
    -440
    -
    -
    # File 'mrbgems/mruby-string-ext/mrblib/string.rb', line 398
    -
    -def upto(max, exclusive=false, &block)
    -  return to_enum(:upto, max, exclusive) unless block
    -  raise TypeError, "no implicit conversion of #{max.class} into String" unless max.kind_of? String
    -
    -  len = self.length
    -  maxlen = max.length
    -  # single character
    -  if len == 1 and maxlen == 1
    -    c = self.ord
    -    e = max.ord
    -    while c <= e
    -      break if exclusive and c == e
    -      yield c.chr(__ENCODING__)
    -      c += 1
    -    end
    -    return self
    -  end
    -  # both edges are all digits
    -  bi = self.to_i(10)
    -  ei = max.to_i(10)
    -  if (bi > 0 or bi == "0"*len) and (ei > 0 or ei == "0"*maxlen)
    -    while bi <= ei
    -      break if exclusive and bi == ei
    -      s = bi.to_s
    -      s = s.rjust(len, "0") if s.length < len
    -      yield s
    -      bi += 1
    -    end
    -    return self
    -  end
    -  bs = self
    -  while true
    -    n = (bs <=> max)
    -    break if n > 0
    -    break if exclusive and n == 0
    -    yield bs
    -    break if n == 0
    -    bsiz = bs.size
    -    break if bsiz > max.size || bsiz == 0
    -    bs = bs.succ
    -  end
    -  self
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Struct.html b/docs/api/Struct.html deleted file mode 100644 index 22af859..0000000 --- a/docs/api/Struct.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - Class: Struct - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Struct - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Enumerable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-struct/mrblib/struct.rb
    -
    - -
    - -

    Overview

    -
    - -

    Struct

    - -

    ISO 15.2.18

    - - -
    -
    -
    - - -
    - - - - -

    Constant Summary

    - -

    Constants included - from Enumerable

    -

    Enumerable::NONE

    - - - - - - -

    - Instance Method Summary - collapse -

    - -
      - -
    • - - - #dig(idx, *args) ⇒ Object - - - - - - - - - - - - - -
      -

      call-seq: hsh.dig(key,…) -> object.

      -
      - -
    • - - -
    • - - - #each(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      Calls the given block for each element of self and pass the respective element.

      -
      - -
    • - - -
    • - - - #each_pair(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      Calls the given block for each element of self and pass the name and value of the respective element.

      -
      - -
    • - - -
    • - - - #select(&block) ⇒ Object - - - - - - - - - - - - - -
      -

      Calls the given block for each element of self and returns an array with all elements of which block is not false.

      -
      - -
    • - - -
    - - - - - - - - - - - -

    Methods included from Enumerable

    -

    #all?, #any?, #chain, #chunk, #chunk_while, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #dig(idx, *args) ⇒ Object - - - - - -

    -
    - -

    call-seq: hsh.dig(key,…) -> object

    - -

    Extracts the nested value specified by the sequence of key objects by calling dig at each step, returning nil if any intermediate step is nil.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -
    -
    # File 'mrbgems/mruby-struct/mrblib/struct.rb', line 61
    -
    -def dig(idx,*args)
    -  n = self[idx]
    -  if args.size > 0
    -    n&.dig(*args)
    -  else
    -    n
    -  end
    -end
    -
    -
    - -
    -

    - - #each(&block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block for each element of self and pass the respective element.

    - -

    ISO 15.2.18.4.4

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -13
    -14
    -15
    -16
    -17
    -18
    -
    -
    # File 'mrbgems/mruby-struct/mrblib/struct.rb', line 13
    -
    -def each(&block)
    -  self.class.members.each{|field|
    -    block.call(self[field])
    -  }
    -  self
    -end
    -
    -
    - -
    -

    - - #each_pair(&block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block for each element of self and pass the name and value of the respective element.

    - -

    ISO 15.2.18.4.5

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -26
    -27
    -28
    -29
    -30
    -31
    -
    -
    # File 'mrbgems/mruby-struct/mrblib/struct.rb', line 26
    -
    -def each_pair(&block)
    -  self.class.members.each{|field|
    -    block.call(field.to_sym, self[field])
    -  }
    -  self
    -end
    -
    -
    - -
    -

    - - #select(&block) ⇒ Object - - - - - -

    -
    - -

    Calls the given block for each element of self and returns an array with all elements of which block is not false.

    - -

    ISO 15.2.18.4.7

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -39
    -40
    -41
    -42
    -43
    -44
    -45
    -46
    -
    -
    # File 'mrbgems/mruby-struct/mrblib/struct.rb', line 39
    -
    -def select(&block)
    -  ary = []
    -  self.class.members.each{|field|
    -    val = self[field]
    -    ary.push(val) if block.call(val)
    -  }
    -  ary
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/Symbol.html b/docs/api/Symbol.html deleted file mode 100644 index f869f18..0000000 --- a/docs/api/Symbol.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - - - - Class: Symbol - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: Symbol - - - -

    -
    - -
    -
    Inherits:
    -
    - Object - -
      -
    • Object
    • - - - -
    - show all - -
    -
    - - - - - - -
    -
    Includes:
    -
    Comparable
    -
    - - - - - - -
    -
    Defined in:
    -
    mrblib/symbol.rb,
    - mrbgems/mruby-symbol-ext/mrblib/symbol.rb
    -
    -
    - -
    - - - - - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods included from Comparable

    -

    #<, #<=, #==, #>, #>=, #between?, #clamp

    - - -
    -

    Instance Method Details

    - - -
    -

    - - #capitalizeObject - - - - - -

    -
    - -

    call-seq: sym.capitalize -> symbol

    - -

    Same as sym.to_s.capitalize.intern.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -12
    -13
    -14
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 12
    -
    -def capitalize
    -  (self.to_s.capitalize! || self).to_sym
    -end
    -
    -
    - -
    -

    - - #casecmp(other) ⇒ Object - - - - - -

    -
    - -

    call-seq: sym.casecmp(other) -> -1, 0, +1 or nil

    - -

    Case-insensitive version of Symbol#<=>.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -42
    -43
    -44
    -45
    -46
    -47
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 42
    -
    -def casecmp(other)
    -  return nil unless other.kind_of?(Symbol)
    -  lhs =  self.to_s; lhs.upcase!
    -  rhs = other.to_s.upcase
    -  lhs <=> rhs
    -end
    -
    -
    - -
    -

    - - #casecmp?(sym) ⇒ Boolean - - - - - -

    -
    - -

    call-seq: sym.casecmp?(other) -> true, false, or nil

    - -

    Returns true if sym and other_sym are equal after case folding, false if they are not equal, and nil if other_sym is not a string.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -56
    -57
    -58
    -59
    -60
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 56
    -
    -def casecmp?(sym)
    -  c = self.casecmp(sym)
    -  return nil if c.nil?
    -  return c == 0
    -end
    -
    -
    - -
    -

    - - #downcaseObject - - - - - -

    -
    - -

    call-seq: sym.downcase -> symbol

    - -

    Same as sym.to_s.downcase.intern.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -22
    -23
    -24
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 22
    -
    -def downcase
    -  (self.to_s.downcase! || self).to_sym
    -end
    -
    -
    - -
    -

    - - #empty?Boolean - - - - - -

    -
    - -

    call-seq: sym.empty? -> true or false

    - -

    Returns that sym is :“” or not.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - -
    • - -
    - -
    - - - - - - -
    -
    -
    -
    -68
    -69
    -70
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 68
    -
    -def empty?
    -  self.length == 0
    -end
    -
    -
    - -
    -

    - - #to_procObject - - - - - -

    - - - - -
    -
    -
    -
    -2
    -3
    -4
    -5
    -6
    -7
    -
    -
    # File 'mrblib/symbol.rb', line 2
    -
    -def to_proc
    -  mid = self
    -  ->(obj,*args,**opts,&block) do
    -    obj.__send__(mid, *args, **opts, &block)
    -  end
    -end
    -
    -
    - -
    -

    - - #upcaseObject - - - - - -

    -
    - -

    call-seq: sym.upcase -> symbol

    - -

    Same as sym.to_s.upcase.intern.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -32
    -33
    -34
    -
    -
    # File 'mrbgems/mruby-symbol-ext/mrblib/symbol.rb', line 32
    -
    -def upcase
    -  (self.to_s.upcase! || self).to_sym
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/TCPServer.html b/docs/api/TCPServer.html deleted file mode 100644 index c7707b0..0000000 --- a/docs/api/TCPServer.html +++ /dev/null @@ -1,524 +0,0 @@ - - - - - - - Class: TCPServer - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: TCPServer - - - -

    -
    - -
    -
    Inherits:
    -
    - TCPSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from TCPSocket

    -

    _new_with_prelude

    - - - - - - - - - -

    Methods inherited from IPSocket

    -

    #addr, getaddress, #peeraddr, #recvfrom

    - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(host = nil, service) ⇒ TCPServer - - - - - -

    -
    - -

    Returns a new instance of TCPServer.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -265
    -266
    -267
    -268
    -269
    -270
    -271
    -272
    -273
    -274
    -275
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 265
    -
    -def initialize(host=nil, service)
    -  ai = Addrinfo.getaddrinfo(host, service, nil, nil, nil, Socket::AI_PASSIVE)[0]
    -  @init_with_fd = true
    -  super(Socket._socket(ai.afamily, Socket::SOCK_STREAM, 0), "r+")
    -  if Socket.const_defined?(:SO_REUSEADDR)
    -    self.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true)
    -  end
    -  Socket._bind(self.fileno, ai.to_sockaddr)
    -  listen(5)
    -  self
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #acceptObject - - - - - -

    - - - - -
    -
    -
    -
    -277
    -278
    -279
    -280
    -281
    -282
    -283
    -284
    -285
    -286
    -287
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 277
    -
    -def accept
    -  fd = self.sysaccept
    -  begin
    -    TCPSocket._new_with_prelude(fd, "r+") {
    -      @init_with_fd = true
    -    }
    -  rescue
    -    IO._sysclose(fd) rescue nil
    -    raise
    -  end
    -end
    -
    -
    - -
    -

    - - #accept_nonblockObject - - - - - -

    - - - - -
    -
    -
    -
    -289
    -290
    -291
    -292
    -293
    -294
    -295
    -296
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 289
    -
    -def accept_nonblock
    -  begin
    -    self._setnonblock(true)
    -    self.accept
    -  ensure
    -    self._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #listen(backlog) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -298
    -299
    -300
    -301
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 298
    -
    -def listen(backlog)
    -  Socket._listen(self.fileno, backlog)
    -  0
    -end
    -
    -
    - -
    -

    - - #sysacceptObject - - - - - -

    - - - - -
    -
    -
    -
    -303
    -304
    -305
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 303
    -
    -def sysaccept
    -  Socket._accept(self.fileno)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/TCPSocket.html b/docs/api/TCPSocket.html deleted file mode 100644 index 8ed8795..0000000 --- a/docs/api/TCPSocket.html +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - Class: TCPSocket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: TCPSocket - - - -

    -
    - -
    -
    Inherits:
    -
    - IPSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - -
    -

    Direct Known Subclasses

    -

    TCPServer

    -
    - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from IPSocket

    -

    #addr, getaddress, #peeraddr, #recvfrom

    - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(host, service, local_host = nil, local_service = nil) ⇒ TCPSocket - - - - - -

    -
    - -

    Returns a new instance of TCPSocket.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -228
    -229
    -230
    -231
    -232
    -233
    -234
    -235
    -236
    -237
    -238
    -239
    -240
    -241
    -242
    -243
    -244
    -245
    -246
    -247
    -248
    -249
    -250
    -251
    -252
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 228
    -
    -def initialize(host, service, local_host=nil, local_service=nil)
    -  if @init_with_fd
    -    super(host, service)
    -  else
    -    s = nil
    -    e = SocketError
    -    Addrinfo.foreach(host, service) { |ai|
    -      begin
    -        s = Socket._socket(ai.afamily, Socket::SOCK_STREAM, 0)
    -        if local_host or local_service
    -          local_host ||= (ai.afamily == Socket::AF_INET) ? "0.0.0.0" : "::"
    -          local_service ||= "0"
    -          bi = Addrinfo.getaddrinfo(local_host, local_service, ai.afamily, ai.socktype)[0]
    -          Socket._bind(s, bi.to_sockaddr)
    -        end
    -        Socket._connect(s, ai.to_sockaddr)
    -        super(s, "r+")
    -        return
    -      rescue => e0
    -        e = e0
    -      end
    -    }
    -    raise e
    -  end
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - ._new_with_prelude(*args, &pre) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -254
    -255
    -256
    -257
    -258
    -259
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 254
    -
    -def self._new_with_prelude(*args, &pre)
    -  o = self._allocate
    -  o.instance_eval(&pre)
    -  o.initialize(*args)
    -  o
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/TypeError.html b/docs/api/TypeError.html deleted file mode 100644 index 869c634..0000000 --- a/docs/api/TypeError.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Exception: TypeError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: TypeError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.29

    - - -
    -
    -
    - - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/UDPSocket.html b/docs/api/UDPSocket.html deleted file mode 100644 index 10e88ce..0000000 --- a/docs/api/UDPSocket.html +++ /dev/null @@ -1,555 +0,0 @@ - - - - - - - Class: UDPSocket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: UDPSocket - - - -

    -
    - -
    -
    Inherits:
    -
    - IPSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from IPSocket

    -

    #addr, getaddress, #peeraddr, #recvfrom

    - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(af = Socket::AF_INET) ⇒ UDPSocket - - - - - -

    -
    - -

    Returns a new instance of UDPSocket.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -309
    -310
    -311
    -312
    -313
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 309
    -
    -def initialize(af=Socket::AF_INET)
    -  super(Socket._socket(af, Socket::SOCK_DGRAM, 0), "r+")
    -  @af = af
    -  self
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #_sockaddr_in(port, host) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -346
    -347
    -348
    -349
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 346
    -
    -def _sockaddr_in(port, host)
    -  ai = Addrinfo.getaddrinfo(host, port, @af, Socket::SOCK_DGRAM)[0]
    -  ai.to_sockaddr
    -end
    -
    -
    - -
    -

    - - #bind(host, port) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -315
    -316
    -317
    -318
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 315
    -
    -def bind(host, port)
    -  Socket._bind(self.fileno, _sockaddr_in(port, host))
    -  0
    -end
    -
    -
    - -
    -

    - - #connect(host, port) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -320
    -321
    -322
    -323
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 320
    -
    -def connect(host, port)
    -  Socket._connect(self.fileno, _sockaddr_in(port, host))
    -  0
    -end
    -
    -
    - -
    -

    - - #recvfrom_nonblock(*args) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -325
    -326
    -327
    -328
    -329
    -330
    -331
    -332
    -333
    -334
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 325
    -
    -def recvfrom_nonblock(*args)
    -  s = self
    -  begin
    -    self._setnonblock(true)
    -    self.recvfrom(*args)
    -  ensure
    -    # XXX: self is a SystemcallException here! (should be bug)
    -    s._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #send(mesg, flags, host = nil, port = nil) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -336
    -337
    -338
    -339
    -340
    -341
    -342
    -343
    -344
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 336
    -
    -def send(mesg, flags, host=nil, port=nil)
    -  if port
    -    super(mesg, flags, _sockaddr_in(port, host))
    -  elsif host
    -    super(mesg, flags, host)
    -  else
    -    super(mesg, flags)
    -  end
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/UNIXServer.html b/docs/api/UNIXServer.html deleted file mode 100644 index a8c6910..0000000 --- a/docs/api/UNIXServer.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - Class: UNIXServer - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: UNIXServer - - - -

    -
    - -
    -
    Inherits:
    -
    - UNIXSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from UNIXSocket

    -

    #addr, #path, #peeraddr, #recvfrom, socketpair

    - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(path) ⇒ UNIXServer - - - - - -

    -
    - -

    Returns a new instance of UNIXServer.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -523
    -524
    -525
    -526
    -527
    -528
    -529
    -530
    -531
    -532
    -533
    -534
    -535
    -536
    -537
    -538
    -539
    -540
    -541
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 523
    -
    -def initialize(path)
    -  fd = Socket._socket(Socket::AF_UNIX, Socket::SOCK_STREAM, 0)
    -  begin
    -    super(fd)
    -    Socket._bind(fd, Socket.pack_sockaddr_un(path))
    -    self.listen(5)
    -  rescue => e
    -    IO._sysclose(fd) rescue nil
    -    raise e
    -  end
    -
    -  if block_given?
    -    begin
    -      yield self
    -    ensure
    -      self.close rescue nil unless self.closed?
    -    end
    -  end
    -end
    -
    -
    - -
    - - -
    -

    Instance Method Details

    - - -
    -

    - - #acceptObject - - - - - -

    - - - - -
    -
    -
    -
    -543
    -544
    -545
    -546
    -547
    -548
    -549
    -550
    -551
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 543
    -
    -def accept
    -  fd = self.sysaccept
    -  begin
    -    sock = UNIXSocket.for_fd(fd)
    -  rescue
    -    IO._sysclose(fd) rescue nil
    -  end
    -  sock
    -end
    -
    -
    - -
    -

    - - #accept_nonblockObject - - - - - -

    - - - - -
    -
    -
    -
    -553
    -554
    -555
    -556
    -557
    -558
    -559
    -560
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 553
    -
    -def accept_nonblock
    -  begin
    -    self._setnonblock(true)
    -    self.accept
    -  ensure
    -    self._setnonblock(false)
    -  end
    -end
    -
    -
    - -
    -

    - - #listen(backlog) ⇒ Object - - - - - -

    - - - - -
    -
    -
    -
    -562
    -563
    -564
    -565
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 562
    -
    -def listen(backlog)
    -  Socket._listen(self.fileno, backlog)
    -  0
    -end
    -
    -
    - -
    -

    - - #sysacceptObject - - - - - -

    - - - - -
    -
    -
    -
    -567
    -568
    -569
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 567
    -
    -def sysaccept
    -  Socket._accept(self.fileno)
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/UNIXSocket.html b/docs/api/UNIXSocket.html deleted file mode 100644 index 1cc7a4c..0000000 --- a/docs/api/UNIXSocket.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - - - - Class: UNIXSocket - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Class: UNIXSocket - - - -

    -
    - -
    -
    Inherits:
    -
    - BasicSocket - - - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-socket/mrblib/socket.rb
    -
    - -
    - -
    -

    Direct Known Subclasses

    -

    UNIXServer

    -
    - - - - - - -

    Instance Attribute Summary

    - -

    Attributes inherited from BasicSocket

    -

    #do_not_reverse_lookup

    - - - -

    - Class Method Summary - collapse -

    - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - - - -

    Methods inherited from BasicSocket

    -

    do_not_reverse_lookup, do_not_reverse_lookup=, for_fd, #local_address, #recv_nonblock, #remote_address

    - - - - - - - - - -

    Methods inherited from IO

    -

    #<<, #each, #each_byte, #each_char, #hash, open, pipe, popen, #pos=, #print, #printf, #puts, read, #rewind, #ungetbyte

    -
    -

    Constructor Details

    - -
    -

    - - #initialize(path, &block) ⇒ UNIXSocket - - - - - -

    -
    - -

    Returns a new instance of UNIXSocket.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -470
    -471
    -472
    -473
    -474
    -475
    -476
    -477
    -478
    -479
    -480
    -481
    -482
    -483
    -484
    -485
    -486
    -487
    -488
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 470
    -
    -def initialize(path, &block)
    -  if self.is_a? UNIXServer
    -    super(path, "r")
    -  else
    -    super(Socket._socket(Socket::AF_UNIX, Socket::SOCK_STREAM, 0), "r+")
    -    Socket._connect(self.fileno, Socket.sockaddr_un(path))
    -
    -    if block_given?
    -      begin
    -        yield self
    -      ensure
    -        begin
    -          self.close unless self.closed?
    -        rescue StandardError
    -        end
    -      end
    -    end
    -  end
    -end
    -
    -
    - -
    - - -
    -

    Class Method Details

    - - -
    -

    - - .socketpair(type = Socket::SOCK_STREAM, protocol = 0) ⇒ Object - - - - Also known as: - pair - - - - -

    - - - - -
    -
    -
    -
    -491
    -492
    -493
    -494
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 491
    -
    -def socketpair(type=Socket::SOCK_STREAM, protocol=0)
    -  a = Socket.socketpair(Socket::AF_UNIX, type, protocol)
    -  [ UNIXSocket.for_fd(a[0]), UNIXSocket.for_fd(a[1]) ]
    -end
    -
    -
    - -
    - -
    -

    Instance Method Details

    - - -
    -

    - - #addrObject - - - - - -

    - - - - -
    -
    -
    -
    -499
    -500
    -501
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 499
    -
    -def addr
    -  [ "AF_UNIX", path ]
    -end
    -
    -
    - -
    -

    - - #pathObject - - - - - -

    - - - - -
    -
    -
    -
    -503
    -504
    -505
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 503
    -
    -def path
    -  Addrinfo.new(self.getsockname).unix_path
    -end
    -
    -
    - -
    -

    - - #peeraddrObject - - - - - -

    - - - - -
    -
    -
    -
    -507
    -508
    -509
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 507
    -
    -def peeraddr
    -  [ "AF_UNIX", Addrinfo.new(self.getpeername).unix_path ]
    -end
    -
    -
    - -
    -

    - - #recvfrom(maxlen, flags = 0) ⇒ Object - - - - - -

    -
    - -

    def recv_io

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -513
    -514
    -515
    -516
    -517
    -
    -
    # File 'mrbgems/mruby-socket/mrblib/socket.rb', line 513
    -
    -def recvfrom(maxlen, flags=0)
    -  msg, sa = _recvfrom(maxlen, flags)
    -  path = (sa.size > 0) ? Addrinfo.new(sa).unix_path : ""
    -  [ msg, [ "AF_UNIX", path ] ]
    -end
    -
    -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/UncaughtThrowError.html b/docs/api/UncaughtThrowError.html deleted file mode 100644 index 4a7fe9f..0000000 --- a/docs/api/UncaughtThrowError.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - Exception: UncaughtThrowError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: UncaughtThrowError - - - -

    -
    - -
    -
    Inherits:
    -
    - ArgumentError - -
      -
    • Object
    • - - - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrbgems/mruby-catch/mrblib/catch.rb
    -
    - -
    - - - - - -

    Instance Attribute Summary collapse

    -
      - -
    • - - - #tag ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute tag.

      -
      - -
    • - - -
    • - - - #value ⇒ Object - - - - - - - - - readonly - - - - - - - - - -
      -

      Returns the value of attribute value.

      -
      - -
    • - - -
    - - - - - -

    - Instance Method Summary - collapse -

    - - - - - - - - - - - -
    -

    Constructor Details

    - -
    -

    - - #initialize(tag, value) ⇒ UncaughtThrowError - - - - - -

    -
    - -

    Returns a new instance of UncaughtThrowError.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -3
    -4
    -5
    -6
    -7
    -
    -
    # File 'mrbgems/mruby-catch/mrblib/catch.rb', line 3
    -
    -def initialize(tag, value)
    -  @tag = tag
    -  @value = value
    -  super("uncaught throw #{tag.inspect}")
    -end
    -
    -
    - -
    - -
    -

    Instance Attribute Details

    - - - -
    -

    - - #tagObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute tag.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-catch/mrblib/catch.rb', line 2
    -
    -def tag
    -  @tag
    -end
    -
    -
    - - - -
    -

    - - #valueObject (readonly) - - - - - -

    -
    - -

    Returns the value of attribute value.

    - - -
    -
    -
    - - -
    - - - - - - -
    -
    -
    -
    -2
    -3
    -4
    -
    -
    # File 'mrbgems/mruby-catch/mrblib/catch.rb', line 2
    -
    -def value
    -  @value
    -end
    -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/ZeroDivisionError.html b/docs/api/ZeroDivisionError.html deleted file mode 100644 index d2046e1..0000000 --- a/docs/api/ZeroDivisionError.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - Exception: ZeroDivisionError - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Exception: ZeroDivisionError - - - -

    -
    - -
    -
    Inherits:
    -
    - StandardError - -
      -
    • Object
    • - - - - - -
    - show all - -
    -
    - - - - - - - - - - - -
    -
    Defined in:
    -
    mrblib/10error.rb
    -
    - -
    - -

    Overview

    -
    - -

    ISO 15.2.30

    - - -
    -
    -
    - - -
    - - - - - - - - - - - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/_index.html b/docs/api/_index.html deleted file mode 100644 index cc1a2ba..0000000 --- a/docs/api/_index.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - - Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Documentation by YARD 0.9.37

    -
    -

    Alphabetic Index

    - -

    File Listing

    - - -
    -

    Namespace Listing A-Z

    - - - - - - - - - - -
    - - - - - - - - - - - -
      -
    • D
    • -
        - -
      • - Dir - -
      • - -
      -
    - - - - - - - - -
      -
    • G
    • - -
    - - -
    - - -
      -
    • H
    • -
        - -
      • - Hash - -
      • - -
      -
    - - - - - - - - - - - - - - - - - - - - -
      -
    • P
    • -
        - -
      • - Proc - -
      • - -
      -
    - - -
    - - - - - - - - - - - - - - -
      -
    • Y
    • -
        - -
      • - Yielder - - (Enumerator) - -
      • - -
      -
    - - - - -
    - -
    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/class_list.html b/docs/api/class_list.html deleted file mode 100644 index 6b25e1f..0000000 --- a/docs/api/class_list.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - Class List - - - -
    -
    -

    Class List

    - - - -
    - - -
    - - diff --git a/docs/api/css/common.css b/docs/api/css/common.css deleted file mode 100644 index cf25c45..0000000 --- a/docs/api/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/docs/api/css/full_list.css b/docs/api/css/full_list.css deleted file mode 100644 index 6eef5e4..0000000 --- a/docs/api/css/full_list.css +++ /dev/null @@ -1,58 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; - background: #fafafa; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } -#full_list ul { padding: 0; } -#full_list li { padding: 0; margin: 0; list-style: none; } -#full_list li .item { padding: 5px 5px 5px 12px; } -#noresults { padding: 7px 12px; background: #fff; } -#content.insearch #noresults { margin-left: 7px; } -li.collapsed ul { display: none; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { cursor: default; background-position: top left; } -li { color: #666; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.odd { background: #f0f0f0; } -li.even { background: #fafafa; } -.item:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a, a:visited { text-decoration: none; color: #05a; } -li.clicked > .item { background: #05a; color: #ccc; } -li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } -li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; border-radius: 3px; } -#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } -#full_list_nav a, #nav a:visited { color: #358; } -#full_list_nav a:hover { background: transparent; color: #5af; } -#full_list_nav span:after { content: ' | '; } -#full_list_nav span:last-child:after { content: ''; } - -#content h1 { margin-top: 0; } -li { white-space: nowrap; cursor: normal; } -li small { display: block; font-size: 0.8em; } -li small:before { content: ""; } -li small:after { content: ""; } -li small.search_info { display: none; } -#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #666; padding-left: 0; padding-right: 24px; } -#content.insearch #search { background-position: center right; } -#search input { width: 110px; } - -#full_list.insearch ul { display: block; } -#full_list.insearch .item { display: none; } -#full_list.insearch .found { display: block; padding-left: 11px !important; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/docs/api/css/mruby.css b/docs/api/css/mruby.css deleted file mode 100644 index e69de29..0000000 diff --git a/docs/api/css/style.css b/docs/api/css/style.css deleted file mode 100644 index f169a65..0000000 --- a/docs/api/css/style.css +++ /dev/null @@ -1,503 +0,0 @@ -html { - width: 100%; - height: 100%; -} -body { - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - width: 100%; - margin: 0; - padding: 0; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} - -#nav { - position: relative; - width: 100%; - height: 100%; - border: 0; - border-right: 1px dotted #eee; - overflow: auto; -} -.nav_wrap { - margin: 0; - padding: 0; - width: 20%; - height: 100%; - position: relative; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; - flex-shrink: 0; - -webkit-flex-shrink: 0; - -ms-flex: 1 0; -} -#resizer { - position: absolute; - right: -5px; - top: 0; - width: 10px; - height: 100%; - cursor: col-resize; - z-index: 9999; -} -#main { - flex: 5 1; - -webkit-flex: 5 1; - -ms-flex: 5 1; - outline: none; - position: relative; - background: #fff; - padding: 1.2em; - padding-top: 0.2em; - box-sizing: border-box; -} - -@media (max-width: 920px) { - .nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; } - #resizer { display: none; } - #nav { - z-index: 9999; - background: #fff; - display: none; - position: absolute; - top: 40px; - right: 12px; - width: 500px; - max-width: 80%; - height: 80%; - overflow-y: scroll; - border: 1px solid #999; - border-collapse: collapse; - box-shadow: -7px 5px 25px #aaa; - border-radius: 2px; - } -} - -@media (min-width: 920px) { - body { height: 100%; overflow: hidden; } - #main { height: 100%; overflow: auto; } - #search { display: none; } -} - -@media (max-width: 320px) { - body { height: 100%; overflow: hidden; overflow-wrap: break-word; } - #main { height: 100%; overflow: auto; } -} - -#main img { max-width: 100%; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; - position: relative; -} -h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; } -h2 small a { - display: block; - height: 20px; - border: 1px solid #aaa; - border-bottom: 0; - border-top-left-radius: 5px; - background: #f8f8f8; - position: relative; - padding: 2px 7px; -} -a { font-weight: 550; } -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; } -.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt { - color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link a, .docstring .object_link a { - font-family: monospace; font-size: 1.05em; - color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em; - border-radius: 4px; -} -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } -.summary_desc pre.code .object_link a, .docstring pre.code .object_link a { - padding: 0px; background: inherit; color: inherit; border-radius: inherit; -} - -/* style for */ -#filecontents table, .docstring table { border-collapse: collapse; } -#filecontents table th, #filecontents table td, -.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; } -#filecontents table tr:nth-child(odd), -.docstring table tr:nth-child(odd) { background: #eee; } -#filecontents table tr:nth-child(even), -.docstring table tr:nth-child(even) { background: #fff; } -#filecontents table th, .docstring table th { background: #fff; } - -/* style for
      */ -#filecontents li > p, .docstring li > p { margin: 0px; } -#filecontents ul, .docstring ul { padding-left: 20px; } -/* style for
      */ -#filecontents dl, .docstring dl { border: 1px solid #ccc; } -#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; } -#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; } -#filecontents dd > p, .docstring dd > p { margin: 0px; } - -.note { - color: #222; - margin: 20px 0; - padding: 10px; - border: 1px solid #eee; - border-radius: 3px; - display: block; -} -.docstring .note { - border-left-color: #ccc; - border-left-width: 5px; -} -.note.todo { background: #ffffc5; border-color: #ececaa; } -.note.returns_void { background: #efefef; } -.note.deprecated { background: #ffe5e5; border-color: #e9dada; } -.note.title.deprecated { background: #ffe5e5; border-color: #e9dada; } -.note.private { background: #ffffc5; border-color: #ececaa; } -.note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; } -.summary_signature + .note.title { margin-left: 7px; } -h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; } -.note.title { background: #efefef; } -.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; } -.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; } -.note.title.private { background: #d5d5d5; border-color: #c5c5c5; } -.note.title.not_defined_here { background: transparent; border: none; font-style: italic; } -.discussion .note { margin-top: 6px; } -.discussion .note:first-child { margin-top: 0; } - -h3.inherited { - font-style: italic; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-weight: normal; - padding: 0; - margin: 0; - margin-top: 12px; - margin-bottom: 3px; - font-size: 13px; -} -p.inherited { - padding: 0; - margin: 0; - margin-left: 25px; -} - -.box_info dl { - margin: 0; - border: 0; - width: 100%; - font-size: 1em; - display: flex; - display: -webkit-flex; - display: -ms-flexbox; -} -.box_info dl dt { - flex-shrink: 0; - -webkit-flex-shrink: 1; - -ms-flex-shrink: 1; - width: 100px; - text-align: right; - font-weight: bold; - border: 1px solid #aaa; - border-width: 1px 0px 0px 1px; - padding: 6px 0; - padding-right: 10px; -} -.box_info dl dd { - flex-grow: 1; - -webkit-flex-grow: 1; - -ms-flex: 1; - max-width: 420px; - padding: 6px 0; - padding-right: 20px; - border: 1px solid #aaa; - border-width: 1px 1px 0 0; - overflow: hidden; - position: relative; -} -.box_info dl:last-child > * { - border-bottom: 1px solid #aaa; -} -.box_info dl:nth-child(odd) > * { background: #eee; } -.box_info dl:nth-child(even) > * { background: #fff; } -.box_info dl > * { margin: 0; } - -ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; } -.index_inline_list { padding-left: 0; font-size: 1.1em; } - -.index_inline_list li { - list-style: none; - display: inline-block; - padding: 0 12px; - line-height: 30px; - margin-bottom: 5px; -} - -dl.constants { margin-left: 10px; } -dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; } -dl.constants.compact dt { display: inline-block; font-weight: normal } -dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; } -dl.constants .docstring .note:first-child { margin-top: 5px; } - -.summary_desc { - margin-left: 32px; - display: block; - font-family: sans-serif; - font-size: 1.1em; - margin-top: 8px; - line-height: 1.5145em; - margin-bottom: 0.8em; -} -.summary_desc tt { font-size: 0.9em; } -dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; } -dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; } -dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; } -dl.constants .discussion *:first-child { margin-top: 0; } -dl.constants .discussion *:last-child { margin-bottom: 0; } - -.method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; } -.method_details.first { border: 0; margin-top: 5px; } -.method_details.first h3.signature { margin-top: 1em; } -p.signature, h3.signature { - font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace; - padding: 6px 10px; margin-top: 1em; - background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px; -} -p.signature tt, -h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; } -p.signature .overload, -h3.signature .overload { display: block; } -p.signature .extras, -h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; } -p.signature .not_defined_here, -h3.signature .not_defined_here, -p.signature .aliases, -h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; } -p.signature .aliases .names, -h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; } - -.tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; } -.tags .tag_title tt { color: initial; padding: initial; background: initial; } -.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; } -.tags ul li { margin-bottom: 3px; } -.tags ul .name { font-family: monospace; font-weight: bold; } -.tags ul .note { padding: 3px 6px; } -.tags { margin-bottom: 12px; } - -.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; } -.tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; } -.tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; } - -.tags .overload .overload_item { list-style: none; margin-bottom: 25px; } -.tags .overload .overload_item .signature { - padding: 2px 8px; - background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px; -} -.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; } -.tags .overload .docstring { margin-top: 15px; } - -.defines { display: none; } - -#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; } - -.showSource { font-size: 0.9em; } -.showSource a, .showSource a:visited { text-decoration: none; color: #666; } - -#content a, #content a:visited { text-decoration: none; color: #05a; } -#content a:hover { background: #ffffa5; } - -ul.summary { - list-style: none; - font-family: monospace; - font-size: 1em; - line-height: 1.5em; - padding-left: 0px; -} -ul.summary a, ul.summary a:visited { - text-decoration: none; font-size: 1.1em; -} -ul.summary li { margin-bottom: 5px; } -.summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; } -.summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; } -.summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; } -ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;} -ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; } -#content .summary_signature:hover a, -#content .summary_signature:hover a:visited { - background: transparent; - color: #049; -} - -p.inherited a { font-family: monospace; font-size: 0.9em; } -p.inherited { word-spacing: 5px; font-size: 1.2em; } - -p.children { font-size: 1.2em; } -p.children a { font-size: 0.9em; } -p.children strong { font-size: 0.8em; } -p.children strong.modules { padding-left: 5px; } - -ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; } -ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; } -ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; } -ul.fullTree li:first-child { padding-top: 0; background: transparent; } -ul.fullTree li:last-child { padding-bottom: 0; } -.showAll ul.fullTree { display: block; } -.showAll .inheritName { display: none; } - -#search { position: absolute; right: 12px; top: 0px; z-index: 9000; } -#search a { - display: block; float: left; - padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a; - border: 1px solid #d8d8e5; - border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; - background: #F1F8FF; - box-shadow: -1px 1px 3px #ddd; -} -#search a:hover { background: #f5faff; color: #06b; fill: #06b; } -#search a.active { - background: #568; padding-bottom: 20px; color: #fff; fill: #fff; - border: 1px solid #457; - border-top-left-radius: 5px; border-top-right-radius: 5px; -} -#search a.inactive { color: #999; fill: #999; } -.inheritanceTree, .toggleDefines { - float: right; - border-left: 1px solid #aaa; - position: absolute; top: 0; right: 0; - height: 100%; - background: #f6f6f6; - padding: 5px; - min-width: 55px; - text-align: center; -} - -#menu { font-size: 1.3em; color: #bbb; } -#menu .title, #menu a { font-size: 0.7em; } -#menu .title a { font-size: 1em; } -#menu .title { color: #555; } -#menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; } -#menu a:hover { color: #05a; } - -#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; } -#footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; } -#footer a:hover { color: #05a; } - -#listing ul.alpha { font-size: 1.1em; } -#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; } -#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; } -#listing ul.alpha ul { margin: 0; padding-left: 15px; } -#listing ul small { color: #666; font-size: 0.7em; } - -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } - -#content ul.summary li.deprecated .summary_signature a, -#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; } - -#toc { - position: relative; - float: right; - overflow-x: auto; - right: -3px; - margin-left: 20px; - margin-bottom: 20px; - padding: 20px; padding-right: 30px; - max-width: 300px; - z-index: 5000; - background: #fefefe; - border: 1px solid #ddd; - box-shadow: -2px 2px 6px #bbb; -} -#toc .title { margin: 0; } -#toc ol { padding-left: 1.8em; } -#toc li { font-size: 1.1em; line-height: 1.7em; } -#toc > ol > li { font-size: 1.1em; font-weight: bold; } -#toc ol > li > ol { font-size: 0.9em; } -#toc ol ol > li > ol { padding-left: 2.3em; } -#toc ol + li { margin-top: 0.3em; } -#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; } -#toc.hidden:hover { background: #fafafa; } -#filecontents h1 + #toc.nofloat { margin-top: 0; } -@media (max-width: 560px) { - #toc { - margin-left: 0; - margin-top: 16px; - float: none; - max-width: none; - } -} - -/* syntax highlighting */ -.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; } -#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; } -#filecontents pre.code, .docstring pre.code { display: block; } -.source_code .lines { padding-right: 12px; color: #555; text-align: right; } -#filecontents pre.code, .docstring pre.code, -.tags pre.example { - padding: 9px 14px; - margin-top: 4px; - border: 1px solid #e1e1e8; - background: #f7f7f9; - border-radius: 4px; - font-size: 1em; - overflow-x: auto; - line-height: 1.2em; -} -pre.code { color: #000; tab-size: 2; } -pre.code .info.file { color: #555; } -pre.code .val { color: #036A07; } -pre.code .tstring_content, -pre.code .heredoc_beg, pre.code .heredoc_end, -pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep, -pre.code .words_beg, pre.code .words_end, pre.code .words_sep, -pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep, -pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep, -pre.code .tstring, pre.code .dstring { color: #036A07; } -pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s, -pre.code .rubyid_to_sym, pre.code .rubyid_to_f, -pre.code .dot + pre.code .id, -pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; } -pre.code .comment { color: #0066FF; } -pre.code .const, pre.code .constant { color: #585CF6; } -pre.code .label, -pre.code .symbol { color: #C5060B; } -pre.code .kw, -pre.code .rubyid_require, -pre.code .rubyid_extend, -pre.code .rubyid_include { color: #0000FF; } -pre.code .ivar { color: #318495; } -pre.code .gvar, -pre.code .rubyid_backref, -pre.code .rubyid_nth_ref { color: #6D79DE; } -pre.code .regexp, .dregexp { color: #036A07; } -pre.code a { border-bottom: 1px dotted #bbf; } -/* inline code */ -*:not(pre) > code { - padding: 1px 3px 1px 3px; - border: 1px solid #E1E1E8; - background: #F7F7F9; - border-radius: 4px; -} - -/* Color fix for links */ -#content .summary_desc pre.code .id > .object_link a, /* identifier */ -#content .docstring pre.code .id > .object_link a { color: #0085FF; } -#content .summary_desc pre.code .const > .object_link a, /* constant */ -#content .docstring pre.code .const > .object_link a { color: #585CF6; } diff --git a/docs/api/file.AUTHORS.html b/docs/api/file.AUTHORS.html deleted file mode 100644 index 045adbf..0000000 --- a/docs/api/file.AUTHORS.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - File: AUTHORS - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      Authors of mruby (mruby developers)

      - -

      The List of Contributors sorted by number of commits (as of 2025-03-01 8ba2ed6)

      - -

      6083 Yukihiro “Matz” Matsumoto (@matz)* 673 dearblue (@dearblue)* 587 KOBAYASHI Shuji (@shuujii) 353 Daniel Bovensiepen (@bovi)* 345 Takeshi Watanabe (@take-cheeze)* 333 Masaki Muranaka (@monaka) 234 Jun Hiroe (@suzukaze) 228 Tomoyuki Sahara (@tsahara)* 220 Cremno (@cremno)* 219 John Bampton (@jbampton) 209 Yuki Kurihara (@ksss)+ 144 Yasuhiro Matsumoto (@mattn)* 113 Carson McDonald (@carsonmcdonald) 104 Tomasz Pędraszewski (@dabroz)* 83 Akira Yumiyama (@akiray03)* 83 skandhas (@skandhas) 80 Masamitsu MURASE (@masamitsu-murase) 71 Tatsuhiko Kubo (@cubicdaiya)* 71 Yuichiro MASUI (@masuidrive) 69 Hiroshi Mimaki (@mimaki)* 62 Yuichiro Kaneko (@yui-knk)+ 59 Kurebayashi, Takahiro (@crimsonwoods)* 56 h2so5 (@h2so5) 52 Ralph Desir (@Mav7)* 48 Paolo Bosetti (@pbosetti)* 45 Rory O’Connell (@RoryO)* 42 fleuria (@flaneur2020) 40 Christopher Aue (@christopheraue) 40 Seba Gamboa (@sagmor) 39 Kouhei Sutou (@kou)* 38 Koji Yoshioka (@kyab)+ 32 Masayoshi Takahashi (@takahashim)+ 31 MATSUMOTO Ryosuke (@matsumotory) 30 Nobuyoshi Nakada (@nobu) 26 Hoshiumi Arata (@hoshiumiarata)* 25 Julian Aron Prenner (@furunkel)* 22 Clayton Smith (@clayton-shopify) 22 Uchio Kondo (@udzura)* 22 Zachary Scott (@zzak)* 21 Ryan Lopopolo (@lopopolo) 20 Ryan Scott (@ryan-scott-dev)* 19 Bouke van der Bijl (@bouk) 19 Jared Breeden (@jbreeden)* 19 go kikuta (@gkta)* 18 Corey Powell (@IceDragon200) 18 Hidetaka Takano (@TJ-Hidetaka-Takano) 18 Jon Maken (@jonforums)+ 18 mirichi (@mirichi) 17 Mitchell Blank Jr (@mitchblank)* 16 bggd (@bggd) 16 kano4 (@kano4) 15 Felix Jones (@felixjones)* 14 Blaž Hrastnik (@archseer)* 14 Kazuki Tsujimoto (@k-tsj) 14 Tadashi FUKUZAWA (@FUKUZAWA-Tadashi)+ 14 fn ⌃ ⌥ (@FnControlOption) 14 leviongit (@leviongit) 13 Jose Narvaez (@goyox86) 13 Patrick Hogan (@pbhogan) 12 Akira Kuroda (@akuroda) 12 Kouki Ooyatsu (kaishuu0123)* 12 NAKAMURA Usaku (@unak)* 12 Ray Chason (@chasonr)* 12 Takashi Sawanaka (@sdottaka)* 12 Ukrainskiy Sergey (@ukrainskiysergey) 12 Xuejie “Rafael” Xiao (@xxuejie)* 11 Julien Ammous (@schmurfy) 11 Kazuho Oku (@kazuho) 11 RIZAL Reckordp (@Reckordp)+ 11 Seeker (@SeekingMeaning) 11 takkaw (@takkaw) 10 Miura Hideki (@miura1729) 10 Narihiro Nakamura (@authorNari) 10 YAMAMOTO Masaya (pandax381) 10 Yuichi Nishiwaki (@nyuichi) 9 Akira Mitsui (@murasesyuka)* 9 Frank Celler (@fceller) 9 Tatsuya Matsumoto (@tmash06)* 8 Takashi Sogabe (@sogabe) 8 Wataru Ashihara (@wataash)* 7 Bhargava Shastry (@bshastry)* 7 Kouichi Nakanishi (@keizo042) 7 Rubyist (@expeditiousRubyist) 7 SiZiOUS (@sizious) 7 Simon Génier (@simon-shopify) 7 Terence Lee (@hone) 7 roco (@rystyle)* 6 Akito Mochizuki (@ak-mochi) 6 Beoran (@beoran) 6 David Siaw (@davidsiaw)* 6 Frederick John Milens III (@fjmilens3) 6 Hiro Asari (@BanzaiMan) 6 INOUE Yasuyuki (@yasuyuki) 6 Junji Sawada (@junjis0203) 6 Kenji Okimoto (@okkez)+ 6 Selman ULUG (@selman) 6 Yusuke Endoh (@mame)* 6 masahino (@masahino) 5 Chris Reuter (@suetanvil) 5 Davide D’Agostino (@DAddYE) 5 Eric Hodel (@drbrain) 5 Hendrik (@Asmod4n) 5 Ichito Nagata (@i110) 5 Keita Obo (@ktaobo)* 5 Max Anselm (@silverhammermba) 5 Rodrigo Malizia (@rmalizia44)+ 5 Syohei YOSHIDA (@syohex) 5 TOMITA Masahiro (@tmtm) 5 Yurie Yamane (@yurie)+ 5 dreamedge (@dreamedge) 5 nkshigeru (@nkshigeru) 5 vickash (@vickash) 5 xuejianqing (@joans321) 4 Dante Catalfamo (@dantecatalfamo) 4 Goro Kikuchi (@gorogit) 4 HASUMI Hitoshi (@hasumikin) 4 Herwin Weststrate (@herwinw) 4 Horimoto Yasuhiro (@komainu8) 4 Jon Moss (@maclover7) 4 Ken Muramatsu (@ken-mu)+ 4 Kohei Suzuki (@eagletmt) 4 Lanza (@LanzaSchneider) 4 Li Yazhou (@flaneur2020) 4 Marcus Stollsteimer (@stomar) 4 NARUSE, Yui (@nurse) 4 Ravil Bayramgalin (@brainopia)+ 4 Satoshi Odawara (@SatoshiOdawara) 4 Yuhei Okazaki (@Yuuhei-Okazaki) 4 Yuji Yamano (@yyamano) 4 kurodash (@kurodash)* 4 wanabe (@wanabe)* 3 Anton Davydov (@davydovanton) 3 Aurora Nockert (@auroranockert) 3 Carlo Prelz (@asfluido)* 3 Daniel K. Sierpiński (@513ry)+ 3 David Turnbull (@AE9RB) 3 Franck Verrot (@franckverrot) 3 J. Mutua (@katmutua)+ 3 Jan Berdajs (@mrbrdo) 3 Jonas Minnberg (@sasq64) 3 Joseph McCullough (@joequery) 3 Mark Delk (@jethrodaniel) 3 Mark McCurry (@fundamental) 3 Nobuhiro Iwamatsu (@iwamatsu) 3 Per Lundberg (@perlun)* 3 Rob Fors (@robfors)* 3 Robert Rowe (@CaptainJet) 3 Sebastián Katzer (@katzer)* 3 Shuta Kimura (@kimushu)+ 3 TERAJIMA, Motoyuki (@trmmy) 3 Taichi AOKI (@aoki1980taichi) 3 Takashi Kokubun (@k0kubun) 3 Tatsuhiro Tsujikawa (@tatsuhiro-t) 3 Thiago Scalone (@scalone) 3 Vladimir Dementyev (@palkan)* 3 William Light (@wrl) 3 bamchoh (@bamchoh) 3 sasaki takeru (@takeru) 3 windwiny (@windwiny) 2 Akira Moroo (@retrage) 2 Artur K (@nemerle) 2 Christian Mauceri (@mauceri) 2 Craig Lehmann (@craiglrock)* 2 Dominic Sisneros (@dsisnero)* 2 Dusan D. Majkic (@dmajkic) 2 Emiliano Lesende (@3miliano) 2 Francois Chagnon (@EiNSTeiN-)* 2 Gilad Zohari (@gzohari) 2 Go Saito (@govm) 2 Hirohito Higashi (@HirohitoHigashi) 2 Hiroyuki Iwatsuki (@iwadon) 2 Huei-Horng Yo (@hiroshiyui) 2 Jonas Kulla (@Ancurio) 2 Jun Takeda (@takjn) 2 Kazuaki Tanaka (@kaz0505) 2 Kazuhiko Yamashita (@pyama86)+ 2 Kazuhiro Sera (@seratch) 2 Kuroda Daisuke (@dycoon)+ 2 Lothar Scholz (@llothar) 2 Lukas Joeressen (@kext) 2 Masahiro Wakame (@vvkame)+ 2 Minao Yamamoto (@tarosay)+ 2 Nihad Abbasov (@NARKOZ) 2 Robert Mosolgo (@rmosolgo) 2 Russel Hunter Yukawa (@rhykw)+ 2 Ryunosuke SATO (@tricknotes) 2 Santa Zhang (@santazhang) 2 Serg Podtynnyi (@shtirlic) 2 Shannen Saez (@shancat) 2 Shouji Kuboyama (@Shokuji)* 2 SouthWolf (@southwolf) 2 TJ Singleton (@tjsingleton) 2 Taiyo Mizuhashi (@taiyoslime)+ 2 Tomás Pollak (@tomas)* 2 Yutaka HARA (@yhara)*+ 2 Zhang Xiaohui (@hifoolno) 2 buty4649 (@buty4649) 2 icm7216 (@icm7216) 1 A-Sat (@asatou)+ 1 Abinoam Praxedes Marques Junior (@abinoam) 1 Alex Wang (@nanamiwang)+ 1 AlexDenisov (@AlexDenisov) 1 Andrew Nordman (@cadwallion) 1 Ashish Kurmi (@boahc077) 1 Atsushi Morimoto (@mynz) 1 Ben A Morgan (@BenMorganIO) 1 Benoit Daloze (@eregon) 1 Colin MacKenzie IV (@sinisterchipmunk) 1 Daehyub Kim (@lateau) 1 Daniel Varga (@vargad) 1 Diamond Rivero (@diamant3) 1 Edgar Boda-Majer (@eboda) 1 Fangrui Song (@MaskRay) 1 Flavio Medeiros (@flaviommedeiros) 1 Francis Bogsanyi (@fbogsany) 1 Guo Xiao (@guoxiao) 1 Gwen Boatrite (@boatrit) 1 Gwendolyn Boatrite (@boatrite) 1 HARADA Makoto (@haramako) 1 HAYASHI Kentaro (@kenhys) 1 Hiroki Mori (@yamori813)+ 1 Hiromasa Ishii (@Hir0)+ 1 Hiroyuki Matsuzaki (@Hiroyuki-Matsuzaki) 1 Hugo Logmans (@hlogmans) 1 Jack Danger Canty (@JackDanger) 1 Jeff Federman (@jefffederman) 1 Jeffrey Crowell (@crowell) 1 Jeremy Ong (@jeremyong) 1 Jiro Nishiguchi (@spiritloose) 1 Joachim Baran (@indiedotkim) 1 Joe Kutner (@jkutner) 1 Jun Aruga (@junaruga) 1 Junichi Kajiwara (@kjunichi) 1 Jurriaan Pruis (@jurriaan) 1 Katsuhiko Kageyama (@kishima)+ 1 Katsuyoshi Ito (@katsuyoshi) 1 Kazuhiro NISHIYAMA (@znz) 1 Kei Sawada (@remore) 1 Kim H Madsen (@kimhmadsen) 1 Koichi ITO (@koic) 1 Konstantin Haase (@rkh) 1 Leo Neat (@Leo-Neat) 1 Lian Cheng (@liancheng) 1 Luis Lavena (@luislavena) 1 Lukas Elmer (@lukaselmer) 1 Lukas Stabe (@Ahti) 1 M.Naruoka (@fenrir-naru) 1 Marcelo Juchem (@juchem) 1 Martin Bosslet (@emboss)+ 1 Masahiko Sawada (@MasahikoSawada) 1 Matt Aimonetti (@mattetti) 1 Max Base (@MaxFork) 1 Maxim Abramchuk (@MaximAbramchuck) 1 Megumi Tomita (@tomykaira)+ 1 Mitchell Hashimoto (@mitchellh) 1 Mitsutaka Mimura (@takkanm) 1 Nathan Ladd (@ntl) 1 Nicholas (@knf) 1 Nozomi SATO (@nozomiS) 1 Okumura Takahiro (@hfm) 1 Patrick Ellis (@pje) 1 Patrick Pokatilo (@SHyx0rmZ) 1 Pavel Evstigneev (@Paxa)+ 1 Pete Kinnecom (@petekinnecom) 1 Prayag Verma (@pra85) 1 Ranmocy (@ranmocy) 1 Robert McNally (@wolfmcnally) 1 Ryan Scott Lewis (@RyanScottLewis) 1 Ryo Okubo (@syucream) 1 SAkira a.k.a. Akira Suzuki (@sakisakira) 1 Santiago Rodriguez (@sanrodari) 1 Satoh, Hiroh (@cho45)+ 1 Satoru Naba (@snaba)+ 1 Sayed Abdelhaleem (@visualsayed) 1 Sergey Ukrainskiy (@ukrainskiysergey) 1 Shugo Maeda (@shugo) 1 Sinkevich Artem (@ArtSin) 1 Sorah Fukumori (@sorah) 1 Stephen Jothen (@sjothen) 1 Stuart Hinson (@stuarth) 1 Takuma Kume (@takumakume)+ 1 Takuya ASADA (@syuu1228) 1 Thomas Schmidt (@digitaltom) 1 Timo Schilling (@timoschilling) 1 Tom Black (@blacktm) 1 Utkarsh Kukreti (@utkarshkukreti) 1 W (@graywolf) 1 Wuffers Lightwolf (@w-x-l) 1 YAMAMOTO Yuji (@igrep) 1 Yevhen Viktorov (@yevgenko) 1 Yoji SHIDARA (@darashi) 1 Yoshiori SHOJI (@yoshiori) 1 Yuji Yokoo (@yujiyokoo) 1 Yukang (@chenyukang) 1 Yurii Nakonechnyi (@inobelar) 1 Yusuke Suzuki (@Constellation)+ 1 Yusuke Tanaka (@csouls) 1 alpha.netzilla (@alpha-netzilla) 1 arton (@arton) 1 duangsuse (@duangsuse) 1 fl0l0u (@fl0l0u) 1 hhc0null (@hhc0null) 1 iTitou (@titouanc) 1 javier ramírez (@javier) 1 liyuray (@liyuray) 1 lucas dicioccio (@lucasdicioccio) 1 n4o847 (@n4o847) 1 niyarin (@niyarin) 1 robert (@R-obert) 1 sbsoftware (@sbsoftware) 1 ssmallkirby (@smallkirby) 1 taku toyama (@tsuichu)

      - -

      * - Entries unified according to names and addresses + - Entries with names different from commits

      - -

      Contributors without named commits

      - -

      Yuichi Osawa (Mitsubishi Electric Micro-Computer Application Software) Shota Nakano (Manycolors) Bjorn De Meyer

      - -

      Corporate contributors

      - -

      Ministry of Economy, Trade and Industry, Japan Kyushu Bureau of Economy, Trade and Industry SCSK KYUSHU CORPORATION Kyushu Institute of Technology Network Applied Communication Laboratory, Inc. Internet Initiative Japan Inc. Specified non-profit organization mruby Forum Mitsubishi Electric Micro-Computer Application Software Co.,Ltd. Manycolors, Inc.

      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.CONTRIBUTING.html b/docs/api/file.CONTRIBUTING.html deleted file mode 100644 index 6da3519..0000000 --- a/docs/api/file.CONTRIBUTING.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - File: CONTRIBUTING - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      How to contribute

      - -

      mruby is an open-source project which is looking forward to each contribution. Contributors agree to license their contribution(s) under MIT license.

      - -

      Your Pull Request

      - -

      To make it easy to review and understand your change please keep the following things in mind before submitting your pull request:

      -
      • -

        Work on the latest possible state of mruby/master

        -
      • -

        Create a branch which is dedicated to your change

        -
      • -

        Test your changes before creating a pull request (rake test)

        -
      • -

        If possible write a test case which confirms your change

        -
      • -

        Don’t mix several features or bug-fixes in one pull request

        -
      • -

        Create a meaningful commit message

        -
      • -

        Explain your change (i.e. with a link to the issue you are fixing)

        -
      • -

        Use mrbgem to provide non ISO features (classes, modules and methods) unless you have a special reason to implement them in the core

        -
      - -

      pre-commit

      - -

      A framework for managing and maintaining multi-language pre-commit hooks. pre-commit can be installed with pip, curl, brew or conda.

      - -

      You need to first install pre-commit and then install the pre-commit hooks with pre-commit install. Now pre-commit will run automatically on git commit!

      - -

      It’s usually a good idea to run the hooks against all the files when adding new hooks (usually pre-commit will only run on the changed files during git hooks). Use pre-commit run --all-files to check all files.

      - -

      To run a single hook use pre-commit run --all-files <hook_id>

      - -

      To update use pre-commit autoupdate

      - -

      Sometimes you might need to skip one or more hooks which can be done with the SKIP environment variable.

      - -

      $ SKIP=yamllint git commit -m "foo"

      - -

      For convenience, we have added pre-commit run --all-files, pre-commit install and pre-commit autoupdate to both the Makefile and the Rakefile. Run them with:

      -
      • -

        make check or rake check

        -
      • -

        make checkinstall or rake checkinstall

        -
      • -

        make checkupdate or rake checkupdate

        -
      - -

      To configure pre-commit you can modify the config file .pre-commit-config.yaml. We use GitHub Actions to run pre-commit on every pull request.

      - - - - -

      Docker

      - -

      We have both a Dockerfile and docker-compose.yml files in the repository root. You can run these with the command line or use Docker Desktop.

      - -

      The Docker image is running Debian bullseye with Ruby and Python installed. You can build the Docker image with:

      - -

      $ docker-compose build test

      - -

      So far we just have one service: test. Running the default docker-compose command will create the Docker image, spin up a container and then build and run all mruby tests.

      - -

      The default docker-compose command is:

      - -

      $ docker-compose -p mruby run test

      - -

      You can also use Make or Rake to run the default docker-compose command from above:

      -
      • -

        make composetest

        -
      • -

        rake composetest

        -
      - -

      List your Docker images with:

      - -
      $ docker images
      -REPOSITORY   TAG       IMAGE ID       CREATED          SIZE
      -mruby-test   latest    ec60f9536948   29 seconds ago   1.29GB
      -
      - -

      You can also run any custom docker-compose command which will override the default. For example to run pre-commit run --all-files type:

      - -

      $ docker-compose -p mruby run test pre-commit run --all-files

      - -

      For convenience, you can also run pre-commit with:

      -
      • -

        make composecheck

        -
      • -

        rake composecheck

        -
      - -

      The bonus of running pre-commit with docker-compose is that you won’t need to install pre-commit and the hooks on your local machine. And that also means you won’t need to install brew, conda or pip.

      - -

      Note limitation: currently running pre-commit with docker-compose we skip the check-executables-have-shebangs hook.

      - -

      Two more examples of custom docker-compose commands are:

      -
      • -

        $ docker-compose -p mruby run test ls

        -
      • -

        $ docker-compose -p mruby run test rake doc:api

        -
      - -

      If you want to test using a different docker-compose YAML config file you can use the -f flag:

      - -

      $ docker-compose -p mruby -f docker-compose.test.yml run test

      - - -

      Spell Checking

      - -

      We are using pre-commit to run codespell to check code for common misspellings. We have a small custom dictionary file codespell.txt.

      - -

      Coding conventions

      - -

      How to style your C and Ruby code which you want to submit.

      - -

      C code

      - -

      The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is written in the C programming language. Please note the following hints for your C code:

      - -

      Comply with C99 (ISO/IEC 9899:1999)

      - -

      mruby should be highly portable to other systems and compilers. For this it is recommended to keep your code as close as possible to the C99 standard (www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).

      - -

      Visual C++ is also an important target for mruby (supported version is 2013 or later). For this reason features that are not supported by Visual C++ may not be used (e.g. %z of strftime()).

      - -

      NOTE: Old GCC requires -std=gnu99 option to enable C99 support.

      - -

      Reduce library dependencies to a minimum

      - -

      The dependencies to libraries should be kept to an absolute minimum. This increases the portability but makes it also easier to cut away parts of mruby on-demand.

      - -

      Insert a break after the function return value:

      - -
      int
      -main(void)
      -{
      -  ...
      -}
      -
      - -

      Ruby code

      - -

      Parts of the standard library of mruby are written in the Ruby programming language itself. Please note the following hints for your Ruby code:

      - -

      Comply with the Ruby standard (ISO/IEC 30170:2012)

      - -

      mruby is currently targeting to execute Ruby code which complies to ISO/IEC 30170:2012 (www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579), unless there’s a clear reason, e.g. the latest Ruby has changed behavior from ISO.

      - -

      Building documentation

      - -

      mruby API

      -
      • -

        YARD - YARD is a documentation generation tool for the Ruby programming language

        -
      • -

        yard-mruby - Document mruby sources with YARD

        -
      • -

        yard-coderay - Adds coderay syntax highlighting to YARD docs

        -
      - -

      C API

      -
      • -

        Doxygen - Generate documentation from source code

        -
      • -

        Graphviz - Graphviz is open source graph visualization software

        -
      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.LEGAL.html b/docs/api/file.LEGAL.html deleted file mode 100644 index 7be5265..0000000 --- a/docs/api/file.LEGAL.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - File: LEGAL - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      LEGAL NOTICE INFORMATION

      - -

      All the files in this distribution are covered under the MIT license (see the file LICENSE) except some files mentioned below:

      -
      • -

        src/string.c (memsearch_swar): 2 clause BSD license code by Wojciech Muła (@WojciechMula)

        -
      • -

        src/fmt_fp.c: public domain by Dave Hylands (@dhylands)

        -
      • -

        mrbgems/mruby-dir/src/Win/dirent.c: MIT-like license by Kevlin Henney

        -
      - -

      [src/string.c] The implementation of mrb_memsearch_ss() is taken from github.com/WojciechMula/sse4-strstr.git

      - -

      Copyright © 2008-2016, Wojciech Muła 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 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.

      - -

      [src/fmt_fp.c]

      - -

      The code in this function was inspired from Fred Bayer’s pdouble.c. Since pdouble.c was released as Public Domain, I’m releasing this code as public domain as well.

      - -

      Dave Hylands

      - -

      The original code can be found in github.com/dhylands/format-float

      - -

      [mrbgems/mruby-dir/src/Win/dirent.c] used only for Windows platform

      - -

      Copyright Kevlin Henney, 1997, 2003, 2012. All rights reserved.

      - -

      Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted without fee, provided that this copyright and permissions notice appear in all copies and derivatives.

      - -

      This software is supplied “as is” without express or implied warranty.

      - -

      But that said, if there are any problems please get in touch.

      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.LICENSE.html b/docs/api/file.LICENSE.html deleted file mode 100644 index adcfc86..0000000 --- a/docs/api/file.LICENSE.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - File: LICENSE - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      Copyright © 2010- mruby developers

      - -

      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.

      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.NEWS.html b/docs/api/file.NEWS.html deleted file mode 100644 index 14bcc0b..0000000 --- a/docs/api/file.NEWS.html +++ /dev/null @@ -1,558 +0,0 @@ - - - - - - - File: NEWS - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      NEWS

      - -

      User visible changes in mruby3.4 from mruby3.3

      - -

      NOTE:” are changes to be aware of.

      - -

      The language

      -
      • -

        mruby now supports private and protected visibitily (b0db0bd)

        -
      • -

        Maximum length of inlined symbols reduced from 5 to 4 characters to provide space for visibility flags (6442a01)

        -
      • -

        Many methods are made private according to CRuby visibility (4a0e806)

        -
      • -

        Generate OP_SSEND for self.method type calls (111fe4b)

        -
      • -

        initialize method will be always private (eb8b412)

        -
      • -

        Add new hooks method_removed, method_undefined (9c74f6e)

        -
      • -

        Add new hooks singleton_method_removed, singleton_method_undefined (0863c08)

        -
      • -

        Updated OP_DEF output from codedump (3a3e877)

        -
      • -

        Better handling of binary strings, e.g. String#b (b0127f0)

        -
      • -

        Hash to_s format has changed (baeeb5e)

        -
      • -

        Some encoding related method such as #force_encoding (e47b4ca), #b (b0127f0)

        -
      • -

        Constant folding for String#+ (6687bdd)

        -
      • -

        Remove Float bit-operation (db8368f)

        -
      • -

        use SWAR technique for strlen performance (cbb31e6)

        -
      • -

        use merge sort for Array#sort (5bd63d6)

        -
      - -

      Changes in C API

      -
      • -

        pool.c renamed to mempool.c (and mrb_pool to mrb_mempool) (49525fa)

        -
      • -

        mrb_pool_value renamed to mrb_irep_pool to reduce confusion (62ef5db)

        -
      • -

        rename BOXNIX_SET_VALUE to BOXNO_SET_VALUE (#6397)

        -
      • -

        MRB_FROZEN_P() is replaced by mrb_frozen_p() (c11d18e)

        -
      • -

        rename color to gc_color (0e79f6b, 1e36d76)

        -
      • -

        add obj->frozen instead of flags MRB_SET_FROZEN_FLAG/MRB_UNSET_FROZEN_FLAG (8276143)

        -
      - -

      Build & Configuration

      -
      • -

        New Build Target: test:run:serial, test:run:serial:lib, test:run:serial:bin (#6423)

        -
      • -

        New Platform: Playstation Portable (#6022)

        -
      • -

        New Platform: emscripten (#6487)

        -
      • -

        New Config: no-float (with MRB_NO_FLOAT) (32200f1)

        -
      - -

      Changes in mrbgems

      -
      • -

        mruby-print: removed; if you do not use mruby-io, mruby use #print etc. in the core (8c8bbd9)

        -
      • -

        mruby-enum-lazy: Add Enumerable::Lazy#grep_v to mruby-enum-lazy (#6171)

        -
      • -

        mruby-io: Add level argument to File.dirname (#6463)

        -
      • -

        mruby-io: File.absolute_path? (#6482)

        -
      • -

        mruby-io: File.absolute_path (96113a2)

        -
      • -

        mruby-toplevel-ext: top-level public/private/protected moved to the core (2a876d2)

        -
      • -

        mruby-metaprog: method list methods now works according to the visibility (9229da1)

        -
      • -

        mruby-metaprog: public_instance_methods, private_instance_methods, protected_instance_methods (9e3e7b2)

        -
      • -

        mruby-encoding: MRB_UTF8_STRING turned on automatically with this gem (74bdae9)

        -
      - -

      Fixed GitHub Issues

      -
      • -

        #6173 Fails to build with tcc(Tiny C Compiler)

        -
      • -

        #6156 ‘/LIBPATH’ issue

        -
      • -

        #6183 “.e”.to_f returns NAN

        -
      • -

        #6182 mrb_read_float() converts “0.3” with a small error compared to strtod()

        -
      • -

        #6210 Unary minus seems broken

        -
      • -

        #6255 Wrong number of characters in broken UTF-8 string

        -
      • -

        #4038 Heap buffer overflow in OP_ENTER

        -
      • -

        #6262 Unable to define == for objects when using Array#delete

        -
      • -

        #6267 When MRB_UTF8_STRING is enabled, giving byte characters for String#index and String#split gives wrong results

        -
      • -

        #6277 MSVC: can’t use malloc() in string.c with WIN32_LEAN_AND_MEAN

        -
      • -

        #6240 Differentiate between lib and lib64 in the build settings.

        -
      • -

        #6304 Calling method_missing with only Kwargs passes arguments incorrectly

        -
      • -

        #6317 mrb_gc_register() may cause GC and collect the object being protected

        -
      • -

        #6307 Planned change patch for mrb_vm_exec()

        -
      • -

        #6298 foo :bar {} is legal in mruby?

        -
      • -

        #6326 Detect “Use-after-free” with address sanitizer

        -
      • -

        #5358 static warning from getpwnam

        -
      • -

        #6339 mrb_ary_delete() may refer to an invalid address (use-after-free)

        -
      • -

        #6346 Block kwargs are passed as last positional arg when using yield

        -
      • -

        #6365 powl() not available when compiling for Dreamcast

        -
      • -

        #6369 100x Performance Regression from 3.1

        -
      • -

        #6270 NODE_ZSUPER from deeply nested blocks will result in a truncated digits for block index in OP_ARGARY

        -
      • -

        #6297 Assigning to a block variable changes the actual block (thus affecting block_given? and yield)

        -
      • -

        #6389 instance_exec named block args don’t work properly

        -
      • -

        #6388 Recent commit broke my windows build

        -
      • -

        #6411 Wrong function unwinding when using return in a block

        -
      • -

        #6439 OP_JMPUW does not call the ensure block when it jumps to the beginning of the begin block

        -
      • -

        #6441 break inside while loop will execute the ensure block outside of the while loop

        -
      • -

        #6453 Bigint: incorrect behavior of ^ operator

        -
      • -

        #6452 Bigint: weird mod behavior

        -
      • -

        #6451 Bigint: incorrect division behavior

        -
      • -

        #6456 bigint: bug with division of a small number by a bigint

        -
      • -

        #6466 mruby-bin-mruby using Kernel#p and Kernel#print in bintest fails test

        -
      • -

        #6467 Heap-Use-After-Free due to Recursive group_by Calls

        -
      • -

        #6471 Discrepancy in codegen for binary operations between master branch and 3.3.0

        -
      • -

        #6477 heap-buffer-overflow in mrb_vm_exec

        -
      • -

        #6485 Hash#rehash does not check if the hash is frozen

        -
      • -

        #6483 Hash#default_proc= accepts arbitrary objects that are not callable

        -
      • -

        #6491 Destroy existing string literals when composing string literals

        -
      - -

      Merged Pull Requests (User Visible Ones)

      -
      • -

        #6171 Add Enumerable::Lazy#grep_v to mruby-enum-lazy

        -
      • -

        #6174 Fix MRUBY_PACKAGE_DIR in mruby-config.bat

        -
      • -

        #6175 Corrected strange conditional in mrb_vm_run()

        -
      • -

        #6176 Stop assuming alias proc in CI_PROC_SET()

        -
      • -

        #6177 gha: add macOS 14 to the build

        -
      • -

        #6184 Remove the L_STOP label

        -
      • -

        #6185 Added mrb_callinfo::u.keep_context for clarity

        -
      • -

        #6186 Omit NULL check of e->cxt in OP_RETURN_BLK

        -
      • -

        #6191 Speed up symbol equality comparison

        -
      • -

        #6192 Fix OP_STOP with exception

        -
      • -

        #6193 Fix wrong assertion in OP_SENDB.

        -
      • -

        #6194 Simplify the calculation of the number of closures in MRB_TT_FIBER

        -
      • -

        #6197 Fix int_xor to call flo_xor.

        -
      • -

        #6201 tasks/doc.rake: standardize the rake doc error messages

        -
      • -

        #6202 Remove the .yardoc folder with rake doc:clean:api

        -
      • -

        #6204 Clean up the .editorconfig file

        -
      • -

        #6209 Minor .gitignore clean up

        -
      • -

        #6211 Minor .gitignore clean up; order entries

        -
      • -

        #6216 Shared empty iv_tbl of module

        -
      • -

        #6217 Strict declaration for mrb_istruct_size()

        -
      • -

        #6219 Avoid assigning a fixed value in the loop

        -
      • -

        #6220 Reorganize mrb_cache_entry and mrb_method_t types

        -
      • -

        #6221 Arranging each_backtrace()

        -
      • -

        #6222 Need to synchronize dbg->regs after VM call in mrdb

        -
      • -

        #6224 mrb_env_unshare() to break the link to fiber

        -
      • -

        #6225 Revert “Adjust environment when mrb_exec_irep happened.”

        -
      • -

        #6227 fix: Array#shuffle(!) result distribution

        -
      • -

        #6228 Revert “env referred from top-level callinfo should not be unshared; fix #4019”

        -
      • -

        #6230 Fix status of fiber after switched by exception raised

        -
      • -

        #6231 Add a way to let other gems handle closing of fds in mruby-io

        -
      • -

        #6232 Fold the code for freeing env

        -
      • -

        #6233 Free stack memory at end of fiber

        -
      • -

        #6235 fix Array#delete always firing the block when deleting nil

        -
      • -

        #6236 unify the code for filter methods (and speed up #reject!)

        -
      • -

        #6237 Stricter env objects to attach to ci

        -
      • -

        #6238 Minimize zero initialization of the stack

        -
      • -

        #6243 Fixed base64 decoding in mruby-pack

        -
      • -

        #6244 Revise scope of role of mrb_vm_run()

        -
      • -

        #6246 Fix typo in test/t/hash.rb

        -
      • -

        #6249 Fix grammar in src/vm.c; catched -> caught

        -
      • -

        #6250 Fix spelling

        -
      • -

        #6251 Clean up root move CODEOWNERS to .github directory

        -
      • -

        #6253 Allow recycling fibers by GC if not referenced directly

        -
      • -

        #6256 Update documentation for mrb_top_run()

        -
      • -

        #6257 fix some mrbconf.md typos

        -
      • -

        #6260 Remove exc_caught from mrb_vm_exec()

        -
      • -

        #6261 fix: to_a integer ranges with begin > end failing

        -
      • -

        #6263 fix: Array#delete mistakenly calling block even if not passed

        -
      • -

        #6264 Must pass keyword arguments for Kernel#to_enum

        -
      • -

        #6265 Fixes Dir.children and Dir.each_child

        -
      • -

        #6266 Passes the nonexistent key as a block argument in Array#delete

        -
      • -

        #6273 Improvements to mrb_protect_atexit()

        -
      • -

        #6275 Fixed Binding#eval that failed to assign to the same variable

        -
      • -

        #6276 Always run atexit on the top-level call frame

        -
      • -

        #6279 Include headers for malloc() explicitly; fix #6277

        -
      • -

        #6280 Remove MRB_ENV_CLOSED flag

        -
      • -

        #6281 Fixes local variables in mruby-binding.

        -
      • -

        #6283 Simplify uvenv()

        -
      • -

        #6288 Detach env of ci explicitly on atexit

        -
      • -

        #6289 Simplify OP_RETURN_BLK and OP_BREAK

        -
      • -

        #6290 Allow to change the output directory name of the libmruby file

        -
      • -

        #6293 Changed the instruction table in opcode.md

        -
      • -

        #6294 Optimise mrb_iv_get

        -
      • -

        #6302 Minor cleanup in mrb_str_init

        -
      • -

        #6303 mrb_str_aset_m() should return replace instead of str

        -
      • -

        #6305 Protect keyword arguments in prepare_missing()

        -
      • -

        #6308 Assume that MRB_CATCH() has mrb->exc set

        -
      • -

        #6310 Doubling the call stack when extending it

        -
      • -

        #6311 Added fast-path for positional arguments less than 15 in OP_SEND

        -
      • -

        #6312 Omit error checking at OP_RETURN, OP_RETURN_BLK and OP_BREAK

        -
      • -

        #6313 Fix wrong column number in opcode.md

        -
      • -

        #6314 Optimize even?/odd? for big integers

        -
      • -

        #6318 Shrink variables in mrb_vm_exec()

        -
      • -

        #6320 Shrinking the code in OP_BREAK and OP_RETURN_BLK

        -
      • -

        #6321 Avoid warnings in lib/*/.rb

        -
      • -

        #6322 Fix mrb_ro_data_p on Intel Mac

        -
      • -

        #6324 Remove localjump_error()

        -
      • -

        #6327 fix ncurses linking issues

        -
      • -

        #6328 Fix use-after-free in obj_free() for env objects

        -
      • -

        #6329 Fix use-after-free in mrb_obj_alloc()

        -
      • -

        #6330 Add a precondition to call mrb_env_unshare().

        -
      • -

        #6331 Restore the GC arena with tests

        -
      • -

        #6332 Must not depend on the “host” build to generate mruby-compiler/core/y.tab.c

        -
      • -

        #6333 Reduce the number of branch instructions in the heap_p()

        -
      • -

        #6335 Add return_ci in CHECKPOINT_MAIN() of OP_RETURN

        -
      • -

        #6338 Need to place static proc objects into 8-byte alignments

        -
      • -

        #6340 Fix use-after-free for Array#<=>

        -
      • -

        #6341 Need to restore the GC arena after some function calls

        -
      • -

        #6344 prefer using mrb_yield to call block arguments

        -
      • -

        #6347 codegen.c,parse.y: remove flattening of yield arguments; fix #6346

        -
      • -

        #6348 Cancel the warning disablement

        -
      • -

        #6349 Perform GC before deleting directories

        -
      • -

        #6350 Fixed character encoding conversion function mismatch

        -
      • -

        #6351 Remove unnecessary mrb_gc_arena_restore()

        -
      • -

        #6353 Fix use-after-free in mrb_ary_delete()

        -
      • -

        #6356 Making splat argument objects invisible from Ruby side

        -
      • -

        #6373 Add build config for Milk-V Duo (RISC-V Linux) board

        -
      • -

        #6382 Make array objects invisible in mrb_gc_register()

        -
      • -

        #6385 Small improvements for mrb_gc_register()

        -
      • -

        #6386 Avoid calling mrb_gv_set() from mrb_gc_unregister()

        -
      • -

        #6387 Small improvements for mrb_gc_unregister()

        -
      • -

        #6390 Fix use-after-free by mrb_gc_unregistor()

        -
      • -

        #6391 Fixed argument forwarding in instance_exec

        -
      • -

        #6392 Fix argument forwarding in mrb_exec_irep()

        -
      • -

        #6393 Follow-up to #6391

        -
      • -

        #6395 Storing method-id inside Symbol#to_proc

        -
      • -

        #6396 Milk-V Build Config: update GPIO gem URL

        -
      • -

        #6397 boxing_no.h: rename BOXNIX_SET_VALUE -> BOXNO_SET_VALUE

        -
      • -

        #6399 Add macOS 15 to the build

        -
      • -

        #6405 io_read: use %i instead of %d in call to mrb_raisef

        -
      • -

        #6407 Allow to exclude specific files in rake install

        -
      • -

        #6408 Improve compliance with C++ standards

        -
      • -

        #6410 Put #include <stdlib.h> in parse.y

        -
      • -

        #6412 Distinguish the call frame of the generator with OP_RETURN_BLK

        -
      • -

        #6413 Add links to documentation in README.md

        -
      • -

        #6415 Fix numbered parameters when used as a singleton

        -
      • -

        #6416 Optimize the “new” method’s iseq

        -
      • -

        #6419 Follow Ruby’s behavior for numbered parameters in -> {}

        -
      • -

        #6420 Update labeler.yml: add label for the tools directory

        -
      • -

        #6422 Add annotations for function names defined in the preprocessor

        -
      • -

        #6423 Adding a serialized test task

        -
      • -

        #6427 Need to update ci variable after re-entry to VM

        -
      • -

        #6428 Change the limits of OP_ADDI and OP_SUBI from 0-127 to 0-255.

        -
      • -

        #6429 Fix numbered parameters when used as hash keys

        -
      • -

        #6432 Moving code in macro arguments out of macros

        -
      • -

        #6434 Added document “Layout of the mruby filesystem”

        -
      • -

        #6436 Make rake doc:update-index prettier friendly

        -
      • -

        #6437 Add more details to the pre-commit config

        -
      • -

        #6438 Remove unused MRuby::Build#list_install_excludes method

        -
      • -

        #6440 Fix redo keyword

        -
      • -

        #6442 Fixed wrong range condition in OP_JMPUW

        -
      • -

        #6443 Fix NODE_NEGATE for bigints

        -
      • -

        #6444 Add test cases for bigints

        -
      • -

        #6446 Omit the _WIN64 definition check

        -
      • -

        #6447 Fixed File.expand_path

        -
      • -

        #6448 Suppress presym in mruby/ext/io.h file

        -
      • -

        #6449 Using presym in the mruby-io/src/file_test.c file

        -
      • -

        #6450 Change MRB_WITH_IO_PREAD_PWRITE configuration name

        -
      • -

        #6454 mruby-bigint: handle rhs bigint in int_mod and int_divmod functions

        -
      • -

        #6455 mruby-bigint: fix rounding behavior in mpz_mdiv and mpz_mdivmod functions

        -
      • -

        #6457 bigint: fix bug with division of a small number by a bigint

        -
      • -

        #6459 FileTest is a module

        -
      • -

        #6461 To create a release package file in draft

        -
      • -

        #6462 Properly cast the return value of memchr()

        -
      • -

        #6463 Add level argument to File.dirname

        -
      • -

        #6465 Add initial playstation portable crossbuild support

        -
      • -

        #6468 Fixed missing changes to IB_FIND_BY_KEY() parameter names

        -
      • -

        #6469 Add more const qualifier for RProc

        -
      • -

        #6472 Moved tests for Integer#quo

        -
      • -

        #6473 Hide mpz_and() symbol

        -
      • -

        #6473 Hide mpz_and() symbol

        -
      • -

        #6474 Avoid array object creation with “unknown keyword” error

        -
      • -

        #6475 Don’t include deleted mruby-print

        -
      • -

        #6478 Fixed buffer overrun in function chars2bytes()

        -
      • -

        #6479 Reimplementation of File.expand_path method

        -
      • -

        #6482 Add File.absolute_path? method

        -
      • -

        #6487 Add Emscripten toolchain & build_config

        -
      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.README.html b/docs/api/file.README.html deleted file mode 100644 index fd8bc96..0000000 --- a/docs/api/file.README.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - File: README - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      - - The mruby programming language - -

      -

      mruby

      - - GitHub Super-Linter - -
      -

      What is mruby

      - -

      mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard with more recent features provided by Ruby 3.x. Also, its syntax is Ruby 3.x compatible except for pattern matching.

      - -

      You can link and embed mruby within your application. The “mruby” interpreter program and the interactive “mirb” shell are provided as examples. You can also compile Ruby programs into compiled byte code using the “mrbc” compiler. All these tools are located in the “bin” directory. “mrbc” can also generate compiled byte code in a C source file. See the “mrbtest” program under the “test” directory for an example.

      - -

      This achievement was sponsored by the Regional Innovation Creation R&D Programs of the Ministry of Economy, Trade and Industry of Japan.

      - -

      How to get mruby

      - -

      To get mruby, you can download the stable version 3.4.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the “git clone” command. You can also install and compile mruby using ruby-install, ruby-build or rvm.

      - -

      The latest development version of mruby can be downloaded via the following URL: github.com/mruby/mruby/zipball/master

      - -

      The trunk of the mruby source tree can be checked out with the following command:

      - -
      $ git clone https://github.com/mruby/mruby.git
      -
      - -

      mruby homepage

      - -

      The URL of the mruby homepage is: mruby.org.

      - -

      Mailing list

      - -

      We don’t have a mailing list, but you can use GitHub issues.

      - -

      How to compile, test, and install (mruby and gems)

      - -

      For the simplest case, type

      - -
      rake all test
      -
      - -

      See the compile.md file for the detail.

      - -

      Building documentation

      - -

      There are two sets of documentation in mruby: the mruby API (generated by YARD) and C API (Doxygen and Graphviz)

      - -

      To build both of them, simply go

      - -
      rake doc
      -
      - -

      You can also view them in your browser

      - -
      rake view_api
      -rake view_capi
      -
      - -

      How to customize mruby (mrbgems)

      - -

      mruby contains a package manager called “mrbgems” that you can use to create extensions in C and/or Ruby. For a guide on how to use mrbgems, consult the mrbgems.md file, and for example code, refer to the examples/mrbgems/ folder.

      - -

      Index of Document

      - - -

      License

      - -

      mruby is released under the MIT License.

      - -

      Note for License

      - -

      mruby has chosen a MIT License due to its permissive license allowing developers to target various environments such as embedded systems. However, the license requires the display of the copyright notice and license information in manuals for instance. Doing so for big projects can be complicated or troublesome. This is why mruby has decided to display “mruby developers” as the copyright name to make it simple conventionally. In the future, mruby might ask you to distribute your new code (that you will commit,) under the MIT License as a member of “mruby developers” but contributors will keep their copyright. (We did not intend for contributors to transfer or waive their copyrights, actual copyright holder name (contributors) will be listed in the AUTHORS file.)

      - -

      Please ask us if you want to distribute your code under another license.

      - -

      How to Contribute

      - -

      To contribute to mruby, please refer to the contribution guidelines and send a pull request to the mruby GitHub repository. By contributing, you grant non-exclusive rights to your code under the MIT License.

      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.SECURITY.html b/docs/api/file.SECURITY.html deleted file mode 100644 index 02e88f3..0000000 --- a/docs/api/file.SECURITY.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - File: SECURITY - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      Security Policy

      - -

      Reporting a Vulnerability

      - -

      If you have any security concern, contact matz@ruby.or.jp.

      - -

      Scope

      - -

      We consider the following issues as vulnerabilities:

      -
      • -

        Remote code execution

        -
      • -

        Crash caused by a valid Ruby script

        -
      - -

      We don’t consider the following issues as vulnerabilities:

      -
      • -

        Runtime C undefined behavior (including integer overflow)

        -
      • -

        Crash caused by misused API

        -
      • -

        Crash caused by modified compiled binary

        -
      • -

        ASAN/Valgrind warning for too big memory allocation mruby assumes malloc(3) returns NULL for too big allocations

        -
      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.TODO.html b/docs/api/file.TODO.html deleted file mode 100644 index 6a82a81..0000000 --- a/docs/api/file.TODO.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - File: TODO - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      Things to Do in the future

      - -

      After mruby 3.1

      -
      • -

        parser and code generator independent from mrb_state (picoruby?)

        -
      • -

        variable sized AST node

        -
      • -

        iv/hash entry cache

        -
      • -

        more peephole optimization (if possible)

        -
      - -

      Things to do (Things we need to consider)

      -
      • -

        begin ... end while cond to behave as CRuby

        -
      • -

        special variables ($1,$2..)

        -
      -
      - - - -
      - - \ No newline at end of file diff --git a/docs/api/file.boxing.html b/docs/api/file.boxing.html deleted file mode 100644 index 2d3ffc0..0000000 --- a/docs/api/file.boxing.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - File: boxing - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
      - - -
      -

      Boxing

      - -

      The mruby objects and data are represented by C data type mrb_value. There are three options how to pack the data values in the mrb_value.

      -
      • -

        Word Boxing

        -
      • -

        NaN Boxing

        -
      • -

        No Boxing

        -
      - -

      Word Boxing

      - -

      Word boxing packs the Ruby data in a word, which is a natural integer size that equals to the size of pointers (intptr_t). Word boxing can be specified by MRB_WORD_BOXING, and it’s default configuration for most platforms.

      - -

      Some values (called immediate values, e.g. integers, booleans, symbols, etc.) are directly packed in the word. The other data types are represented by pointers to the heap allocated structures.

      - -

      The Word boxing packing bit patterns are like following:

      - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypesBit Pattern
    object‘xxxxxxxx xxxxxxxx xxxxxxxx xxxxx000`
    fixnum‘xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxx1`
    nil‘00000000 00000000 00000000 00000000`
    true‘00000000 00000000 00000000 00001100`
    false‘00000000 00000000 00000000 00000100`
    undef‘00000000 00000000 00000000 00010100`
    symbol‘xxxxxxxx xxxxxxxx xxxxxxxx xxxxxx10`
    - -

    On 64-bit platforms (unless MRB_WORDBOX_NO_FLOAT_TRUNCATE), float values are also packed in the mrb_value. In that case, we drop least significant 2 bits from mantissa. If you need full precision for floating-point numbers, define MRB_WORDBOX_NO_FLOAT_TRUNCATE.

    - -

    NaN Boxing

    - -

    NaN boxing packs the Ruby data in a floating-point numbers, which represent NaN (Not a Number) values. Under IEEE753 definitions every value that exponent is all set are considered as NaN. That means NaN can represent 2^51 values. NaN boxing is a teaching to pack the values in those NaN representation. In theory, 64-bit pointers are too big to fit in NaN, but practically most OS use only 48 bits at most for pointers (except for some OS e.g. Solaris).

    - -

    The NaN boxing packing bit patterns are like following:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    TypesBit Pattern
    float‘SEEEEEEE EEEEFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF`
    +/-inf‘S1111111 11110000 00000000 00000000 00000000 00000000 00000000 00000000`
    nan‘01111111 11111000 00000000 00000000 00000000 00000000 00000000 00000000`
    fixnum‘01111111 11111001 00000000 00000000 IIIIIIII IIIIIIII IIIIIIII IIIIIIII`
    symbol‘01111111 11111110 00000000 00000000 SSSSSSSS SSSSSSSS SSSSSSSS SSSSSSSS`
    misc‘01111111 11111111 00000000 00000000 00000000 00000000 00TTTTTT 0000MMMM`
    object‘01111111 11111100 PPPPPPPP PPPPPPPP PPPPPPPP PPPPPPPP PPPPPPPP PPPPPP00`
    ptr‘01111111 11111100 PPPPPPPP PPPPPPPP PPPPPPPP PPPPPPPP PPPPPPPP PPPPPP01`
    nil‘00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000`
    - -

    The object values appear far more frequently than floating-point numbers, so we offset the value so that object pointers are unchanged. This technique is called “favor pointer”.

    - -

    No Boxing

    - -

    No boxing represents mrb_value by the C struct with type and the value union. This is the most portable (but inefficient) representation. No boxing can be specified by MRB_NO_BOXING, and it’s default for debugging configuration (e.g. host-debug).

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.compile.html b/docs/api/file.compile.html deleted file mode 100644 index 2779482..0000000 --- a/docs/api/file.compile.html +++ /dev/null @@ -1,674 +0,0 @@ - - - - - - - File: compile - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    Compile

    - -

    mruby uses Rake to compile and cross-compile all libraries and binaries.

    - -

    Prerequisites

    - -

    To compile mruby out of the source code you need the following tools:

    -
    • -

      C Compiler (e.g. gcc or clang)

      -
    • -

      Linker (e.g. gcc or clang)

      -
    • -

      Archive utility (e.g. ar)

      -
    • -

      Ruby 2.5 or later (e.g. ruby or jruby)

      -
    - -

    Optional:

    -
    • -

      Git (to update mruby source and integrate mrbgems easier)

      -
    • -

      C++ compiler (to use mrbgems which include *.cpp, *.cxx, *.cc)

      -
    • -

      Bison (to compile mrbgems/mruby-compiler/core/parse.y)

      -
    • -

      gperf (to compile mrbgems/mruby-compiler/core/keywords)

      -
    - -

    Note that bison bundled with macOS is too old to compile mruby. Try brew install bison and follow the instruction shown to update the $PATH to compile mruby. We also encourage you to upgrade ruby on macOS in similar manner.

    - -

    Build

    - -

    To compile mruby with the default build configuration, just invoke rake inside of the mruby source root. To generate and execute the test tools call rake test. To clean all build files call rake clean. To see full command line on build, call rake -v.

    - -

    You can specify your own configuration file by the MRUBY_CONFIG environment variable (you can use CONFIG for shorthand for MRUBY_CONFIG). If the path doesn’t exist, build_config/${MRUBY_CONFIG}.rb is used. The default configuration is defined in the build_config/default.rb file.

    - -

    Those build configuration files contain the build configuration of mruby, for example:

    - -
    MRuby::Build.new do |conf|
    -  conf.toolchain :gcc
    -end
    -
    - -

    All tools necessary to compile mruby can be set or modified here.

    - -

    Build Configuration

    - -

    We wish you submit a pull-request to build_config/PLATFORM.rb, once you created a new configuration for a new platform.

    - -

    Inside the configuration file, the following options can be configured based on your environment.

    - -

    Toolchains

    - -

    The mruby build system already contains a set of toolchain templates which configure the build environment for specific compiler infrastructures.

    - -

    GCC

    - -

    Toolchain configuration for the GNU C Compiler.

    - -
    conf.toolchain :gcc
    -
    - -

    clang

    - -

    Toolchain configuration for the LLVM C Compiler clang. Mainly equal to the GCC toolchain.

    - -
    conf.toolchain :clang
    -
    - -

    Visual Studio 2010, 2012 and 2013

    - -

    Toolchain configuration for Visual Studio on Windows. If you use the Visual Studio Command Prompt, you normally do not have to specify this manually, since it gets automatically detected by our build process.

    - -
    conf.toolchain :visualcpp
    -
    - -

    Android

    - -

    Toolchain configuration for Android.

    - -
    conf.toolchain :android
    -
    - -

    Requires the custom standalone Android NDK and the toolchain path in ANDROID_STANDALONE_TOOLCHAIN.

    - -

    Binaries

    - -

    It is possible to select which tools should be compiled during the compilation process. For example,

    -
    • -

      mruby

      -
    • -

      mirb

      -
    - -

    The configuration are done via mrbgems. See Mrbgems section.

    - -

    File Separator

    - -

    Some environments require a different file separator character. It is possible to set the character via conf.file_separator.

    - -
    conf.file_separator = '/'
    -
    - -

    Name of library directory

    - -

    In some environments, the libmruby.a file requires a different directory name than lib. You can be changed to any name by the conf.libdir_name accessor.

    - -
    conf.libdir_name = 'lib64'
    -
    - -

    Alternatively, it can be changed via the environment variable MRUBY_SYSTEM_LIBDIR_NAME when the rake command is run.

    - -
    $ export MRUBY_SYSTEM_LIBDIR_NAME=lib64
    -$ rake clean all
    -
    - -

    NOTES:

    -
    • -

      This environment variable MRUBY_SYSTEM_LIBDIR_NAME does not affect MRuby::CrossBuild. In other words, if you want to change it for MRuby::CrossBuild, you must set it with MRuby::CrossBuild#libdir_name=.

      -
    • -

      If you want to switch this environment variable MRUBY_SYSTEM_LIBDIR_NAME, you must do rake clean.

      -
    - -

    A bad usage example is shown below.

    - -

    console $ rake clean all $ rake MRUBY_SYSTEM_LIBDIR_NAME=lib64 install

    - -

    C Compiler

    - -

    Configuration of the C compiler binary, flags and include paths.

    - -
    conf.cc do |cc|
    -  cc.command = ...
    -  cc.flags = ...
    -  cc.include_paths = ...
    -  cc.defines = ...
    -  cc.option_include_path = ...
    -  cc.option_define = ...
    -  cc.compile_options = ...
    -end
    -
    - -

    C Compiler has header searcher to detect installed library.

    - -

    If you need an include path of header file use search_header_path:

    - -
    # Searches `iconv.h`.
    -# If found it will return include path of the header file.
    -# Otherwise it will return nil.
    -fail 'iconv.h not found' unless conf.cc.search_header_path 'iconv.h'
    -
    - -

    If you need a full file name of header file use search_header:

    - -
    # Searches `iconv.h`.
    -# If found it will return full path of the header file.
    -# Otherwise it will return nil.
    -iconv_h = conf.cc.search_header 'iconv.h'
    -print "iconv.h found: #{iconv_h}\n"
    -
    - -

    Header searcher uses compiler’s include_paths by default. When you are using GCC toolchain (including clang toolchain since its base is gcc toolchain) it will use compiler specific include paths too. (For example /usr/local/include, /usr/include)

    - -

    If you need a special header search paths define a singleton method header_search_paths to C compiler:

    - -
    def conf.cc.header_search_paths
    -  ['/opt/local/include'] + include_paths
    -end
    -
    - -

    Linker

    - -

    Configuration of the Linker binary, flags and library paths.

    - -
    conf.linker do |linker|
    -  linker.command = ...
    -  linker.flags = ...
    -  linker.flags_before_libraries = ...
    -  linker.libraries = ...
    -  linker.flags_after_libraries = ...
    -  linker.library_paths = ...
    -  linker.option_library = ...
    -  linker.option_library_path = ...
    -  linker.link_options = ...
    -end
    -
    - -

    Archiver

    - -

    Configuration of the Archiver binary and flags.

    - -
    conf.archiver do |archiver|
    -  archiver.command = ...
    -  archiver.archive_options = ...
    -end
    -
    - -

    Parser Generator

    - -

    Configuration of the Parser Generator binary and flags.

    - -
    conf.yacc do |yacc|
    -  yacc.command = ...
    -  yacc.compile_options = ...
    -end
    -
    - -

    GPerf

    - -

    Configuration of the GPerf binary and flags.

    - -
    conf.gperf do |gperf|
    -  gperf.command = ...
    -  gperf.compile_options = ...
    -end
    -
    - -

    File Extensions

    - -
    conf.exts do |exts|
    -  exts.object = ...
    -  exts.executable = ...
    -  exts.library = ...
    -end
    -
    - -

    Preallocated Symbols

    - -

    By far, preallocated symbols are highly compatible with the previous versions, so we expect you won’t see any problem with them. But just in case you face any issue, you can disable preallocated symbols by specifying conf.disable_presym.

    - -

    In the build process, mrbc under cross compiling environment will be compiled with this configuration.

    - -

    Mrbgems

    - -

    mruby comes with the (sort of) packaging system named mrbgems. To specify gem, you can use conf.gem in the configuration file.

    - -
    # Integrate a bundled Gem you see in `mrbgems` directory
    -conf.gem :core => 'mruby-something'
    -
    -# Integrate a Gem from GitHub
    -conf.gem :github => 'someone/mruby-another'
    -
    -# Integrate a mruby binary Gem
    -conf.gem :core => 'mruby-bin-mruby'
    -
    -# Integrate a interactive mruby binary Gem
    -conf.gem :core => 'mruby-bin-mirb'
    -
    -# Integrate GemBox (set of Gems)
    -conf.gembox "default"
    -
    - -

    A GemBox is a set of Gems defined in mrbgems/default.gembox for example. It’s just a set of mrbgem configurations.

    - -

    There is a RubyGem (gem for CRuby) named mgem that help you to manage mrbgems. Try gem install mgem. mgem can show you the list of registered mrbgems.

    - -

    See doc/guides/mrbgems.md for more option about mrbgems.

    - -

    Mrbtest

    - -

    Configuration Mrbtest build process.

    - -

    If you want mrbtest.a only, You should set conf.build_mrbtest_lib_only

    - -
    conf.build_mrbtest_lib_only
    -
    - -

    Bintest

    - -

    Tests for mrbgem tools using CRuby. To have bintests place *.rb scripts to bintest/ directory of mrbgems. See mruby-bin-/bintest/.rb if you need examples. If you want a temporary files use tempfile module of CRuby instead of /tmp/.

    - -

    You can enable it with following:

    - -
    conf.enable_bintest
    -
    - -

    C++ ABI

    - -

    By default, mruby uses setjmp/longjmp to implement its exceptions. But it doesn’t release C++ stack object correctly. To support mrbgems written in C++, mruby can be configured to use C++ exception.

    - -

    There are two levels of C++ exception handling. The one is enable_cxx_exception that enables C++ exception, but uses C ABI. The other is enable_cxx_abi where all files are compiled by C++ compiler.

    - -

    When you mix C++ code, C++ exception would be enabled automatically. If you need to enable C++ exception explicitly add the following:

    - -
    conf.enable_cxx_exception
    -
    - -

    C++ exception disabling

    - -

    If your compiler does not support C++, and you want to ensure you don’t use mrbgem written in C++, you can explicitly disable C++ exception, add following:

    - -
    conf.disable_cxx_exception
    -
    - -

    and you will get an error when you try to use C++ gem. Note that it must be called before enable_cxx_exception or gem method.

    - -

    Debugging mode

    - -

    To enable debugging mode add the following:

    - -
    conf.enable_debug
    -
    - -

    When debugging mode is enabled

    -
    • -

      Macro MRB_DEBUG would be defined.

      -
    • -

      Which means mrb_assert() macro is enabled.

      -
    • -

      Debug information of irep would be generated by mrbc.

      -
    • -

      Because -g flag would be added to mrbc runner.

      -
      • -

        You can have better backtrace of mruby scripts with this.

        -
      -
    - -

    Cross-Compilation

    - -

    mruby can also be cross-compiled from one platform to another. To achieve cross-compilation, the build configuration needs to contain an instance of MRuby::CrossBuild. This instance defines the compilation tools and flags for the target platform. An example could look like this:

    - -
    MRuby::CrossBuild.new('32bit') do |conf|
    -  conf.toolchain :gcc
    -
    -  conf.cc.flags << "-m32"
    -  conf.linker.flags << "-m32"
    -end
    -
    - -

    All configuration options of MRuby::Build can also be used in MRuby::CrossBuild. You can find examples under the build_config directory.

    - -

    Mrbtest in Cross-Compilation

    - -

    In cross compilation, you can run mrbtest on an emulator if you have it by changing configuration of test runner.

    - -
    conf.test_runner do |t|
    -  t.command = ... # set emulator. this value must be non nil or false
    -  t.flags = ... # set flags of emulator
    -
    -  def t.run(bin) # override `run` if you need to change the behavior of it
    -    ... # `bin` is the full path of mrbtest
    -  end
    -end
    -
    - -

    Build process

    - -

    During the build process the build directory will be created in the root directory. The structure of this directory will look like this:

    - -
    +- build
    -    |
    -    +- host
    -        |
    -        +- LEGAL        <- License description
    -        |
    -        +- bin          <- Binaries (mirb, mrbc and mruby)
    -        |
    -        +- lib          <- Libraries (libmruby.a and libmruby_core.a)
    -        |
    -        +- mrbc         <- Minimal mrbc place
    -        |
    -        +- mrbgems      <- Compilation result from mrbgems
    -        |
    -        +- mrblib       <- Compilation result from mrblib
    -        |
    -        +- src          <- Compilation result from C sources
    -
    - -

    The compilation workflow will look like this:

    -
    • -

      compile minimal mrbc from src and mrblib sources

      -
    • -

      compile all files under src (object files will be stored in build/host/mrbc/src)

      -
    • -

      compile mruby-compiler gem

      -
    • -

      create build/host/mrbc/lib/libmruby_core.a out of all object files (C only)

      -
    • -

      create build/host/mrbc/bin/mrbc via mruby-bin-mrbc gem

      -
    • -

      compile all files under src and store result in build/host/src

      -
    • -

      create build/host/mrblib/mrblib.c by compiling all *.rb files under mrblib with build/host/mrbc/bin/mrbc

      -
    • -

      compile build/host/mrblib/mrblib.c to build/host/mrblib/mrblib.o

      -
    • -

      create build/host/lib/libmruby.a out of all object files (C and Ruby)

      -
    • -

      compile (normal) mrbgems specified in the configuration file

      -
    • -

      create build/host/lib/libmruby.a from object files from gems and libmruby_core.a

      -
    • -

      create binary commands according to binary gems (e.g. mirb and mruby)

      -
    • -

      copy binaries under build/host/bin to bin directory

      -
    - -
    _____    _____    ______    ____    ____    _____    _____    ____
    -| CC  |->|GEN  |->|AR    |->|CC  |->|CC  |->|AR   |->|CC   |->|CC  |
    -| *.c |  |y.tab|  |core.a|  |mrbc|  |*.rb|  |lib.a|  |mruby|  |mirb|
    - -----    -----    ------    ----    ----    -----    -----    ----
    -
    - -

    Cross-Compilation

    - -

    In case of a cross-compilation to i386 the build directory structure looks like this:

    - -
    +- build
    -    |
    -    +- host
    -    |   |
    -    |   +- bin           <- Native Binaries
    -    |   |
    -    |   +- lib           <- Native Libraries
    -    |   |
    -    |   +- mrbgems
    -    |   |
    -    |   +- src
    -    |
    -    +- i386
    -        |
    -        +- bin            <- Cross-compiled Binaries
    -        |
    -        +- include        <- Header Directory
    -        |
    -        +- lib            <- Cross-compiled Libraries
    -        |
    -        +- mrbgems
    -        |
    -        +- mrblib
    -        |
    -        +- src
    -
    - -

    An extra directory is created for the target platform. In case you compile for i386 a directory called i386 is created under the build directory.

    - -

    The cross compilation workflow starts in the same way as the normal compilation by compiling all native libraries and binaries, except for we don’t have host/mrbc directory (host directory itself works as placeholder for mrbc). Afterwards the cross compilation process proceeds like this:

    -
    • -

      cross-compile all files under src and store result in build/i386/src

      -
    • -

      create build/i386/lib/libmruby_core.a out of C object files

      -
    • -

      create build/i386/mrblib/mrblib.c by compiling all *.rb files under mrblib with native build/host/bin/mrbc

      -
    • -

      cross-compile build/i386/mrblib/mrblib.c to build/i386/mrblib/mrblib.o

      -
    • -

      create build/i386/lib/libmruby.a from object files from gems and libmruby_core.a

      -
    • -

      create binary commands according to binary gems (e.g. mirb and mruby)

      -
    • -

      copy binaries under build/host/bin to bin directory

      -
    - -
    _______________________________________________________________
    -|              Native Compilation for Host System               |
    -|  _____      ______      _____      ____      ____      _____  |
    -| | CC  | -> |AR    | -> |GEN  | -> |CC  | -> |CC  | -> |AR   | |
    -| | *.c |    |core.a|    |y.tab|    |mrbc|    |*.rb|    |lib.a| |
    -|  -----      ------      -----      ----      ----      -----  |
    - ---------------------------------------------------------------
    -                                ||
    -                               \||/
    -                                \/
    - ________________________________________________________________
    -|             Cross Compilation for Target System                |
    -|  _____      _____      _____      ____      ______      _____  |
    -| | CC  | -> |AR   | -> |CC   | -> |CC  | -> |AR    | -> |CC   | |
    -| | *.c |    |lib.a|    |mruby|    |mirb|    |core.a|    |mrbc | |
    -|  -----      -----      -----      ----      ------      -----  |
    - ----------------------------------------------------------------
    -
    - -

    Build Configuration Examples

    - -

    Minimal Library

    - -

    To build a minimal mruby library you need to use the Cross Compiling feature due to the reason that there are functions (e.g. stdio) which can’t be disabled for the main build.

    - -
    MRuby::CrossBuild.new('minimal') do |conf|
    -  conf.toolchain :gcc
    -  conf.cc.defines << 'MRB_NO_STDIO'
    -end
    -
    - -

    This configuration defines a cross compile build called ‘minimal’ which is using the GCC and compiles for the host machine. It also disables all usages of stdio and doesn’t compile any binaries (e.g. mrbc).

    - -

    Test Environment

    - -

    mruby’s build process includes a test environment. In case you start the testing of mruby, a native binary called mrbtest will be generated and executed. This binary contains all test cases which are defined under test/t. In case of a cross-compilation an additional cross-compiled mrbtest binary is generated. You can copy this binary and run on your target system.

    - -

    Embedding mruby in Your Application

    - -

    After the build, you will get libmruby.a. You can link it to your application.

    - -

    For compiler options and library path, you can use mruby-config command for convenience. mruby-config command prints the configuration used for libmruby.a.

    - -
    $ mruby-config --help
    -Usage: mruby-config [switches]
    -  switches:
    -  --cc                        print compiler name
    -  --cflags                    print flags passed to compiler
    -  --ld                        print linker name
    -  --ldflags                   print flags passed to linker
    -  --ldflags-before-libs       print flags passed to linker before linked libraries
    -  --libs                      print linked libraries
    -  --libmruby-path             print libmruby path
    -  --help                      print this help
    -
    - -

    For example, when you have a C source file (c.c) and try to compile and link it with libmruby.a, you can run the following command,

    - -
    `mruby-config --cc --cflags` c.c `mruby-config --ldflags --libs`
    -
    - -

    When you use make, add following lines in Makefile

    - -
    MRB_CONFIG = <path-to-mruby-config>
    -CFLAGS = `$(MRB_CONFIG) --cflags`
    -LDFLAGS = `$(MRB_CONFIG) --ldflags`
    -LIBS = `$(MRB_CONFIG) --libs`
    -
    - -

    Install

    - -

    To install the files in the bin, include and lib directories generated by the “host” build target into a system directory, do the following:

    - -
    $ rake install
    -
    - -

    If there are multiple build targets in the build configuration file, to install the products of all build targets, do the following:

    - -
    $ rake install:full
    -
    - -

    To install only one of several build targets, e.g., the “its-mine” build target, do the following:

    - -
    $ rake install:full:its-mine
    -
    - -

    To install only the executable files, do the following:

    - -
    $ rake install_bin              # only "host" build target
    -$ rake install:bin              # all build targets
    -$ rake install:bin:its-mine     # only "its-mine" build target
    -
    - -

    Installation Directory

    - -

    The installation directory is /usr/local for the “host” build target and /usr/local/mruby/<build-name> for the others. To change them, you can set the environment variable PREFIX or use MRuby::Build#install_prefix = dir in your build configuration file.

    - -

    The PREFIX environment variable affects all build targets and changes the /usr/local part.

    - -

    The MRuby::Build#install_prefix can be set for each individual build target. In this case, the environment variable PREFIX is ignored.

    - -

    Also, if the environment variable DESTDIR is set, it will prepend to the path obtained by install_prefix to determine the final write directory. This is intended for temporary file expansion by the user’s package work.

    -
    - -

    To summarize:

    -
    • -

      The default value of the environment variable PREFIX is /usr/local.

      -
    • -

      For the “host” build target, the default value of MRuby::Build#install_prefix is <PREFIX>.

      -
    • -

      For a build target other than “host”, the default value of MRuby::Build#install_prefix is <PREFIX>/mruby/<build-name>.

      -
    • -

      If the environment variable DESTDIR is set, the actual write directory is <DESTDIR>/<MRuby::Build#install_prefix>.

      -
    - -

    Excluded files

    - -

    In some cases there are files that you do not want to install. In such cases, add a file path filter to the array object MRuby::Build#install_excludes to exclude them.

    - -

    The following is an object that can be defined as a file path filter. The path variable that appears is a relative path based on MRuby::Build#build_dir.

    -
    • -

      string objects: files matched by string.match?(path) are excluded.

      -
    • -

      regexp object: files matched by regexp.match?(path) are excluded.

      -
    • -

      proc object: files which return true with proc.call(path) are excluded.

      -
    - -
    # exclude bin/mrbc
    -conf.install_excludes << exefile("bin/mrbc")
    -
    -# exclude all files under lib/ directory
    -conf.install_excludes << %r(^lib/)
    -
    -# exclude bin/mrbtest, but in this case it is recommended to use string instead of proc
    -conf.install_excludes << proc { |path|
    -  path == exefile("bin/mrbtest")
    -}
    -
    - -

    By default, it contains only a proc object to exclude libmruby_core.

    - -

    Tips

    -
    • -

      If you see compilation troubles, try rake clean first.

      -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.debugger.html b/docs/api/file.debugger.html deleted file mode 100644 index 75201db..0000000 --- a/docs/api/file.debugger.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - File: debugger - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    How to Use the mruby Debugger

    - -

    copyright © 2014 Specified Non-Profit Corporation mruby Forum

    - -

    1. Summary

    - -

    This file documents the mruby debugger (‘mrdb’) methods.

    - -

    2 Debugging with mrdb

    - -

    2.1 Building mrdb

    - -

    The trunk of the mruby source tree, with the most recent mrdb, can be checked out with the following command:

    - -
    $ git clone https://github.com/mruby/mruby.git
    -
    - -

    To run the make command:

    - -
    $ cd mruby
    -$ make
    -
    - -

    By default, the make command will install the debugger files into mruby/bin.

    - -

    You can add the path for mrdb on your host environment with the following command:

    - -
    $ echo "export PATH=\$PATH:MRUBY_ROOT/bin" >> ~/.bashrc
    -$ source ~/.bashrc
    -
    - -

    *MRUBY_ROOT is the directory in which mruby source code will be installed.

    - -

    To confirm mrdb was installed properly, run mrdb with the --version option:

    - -
    $ mrdb --version
    -mruby 3.4.0 (2025-04-20)
    -
    - -

    2.2 Basic Operation

    - -

    2.2.1 Debugging mruby Script Files (rb file) with mrdb

    - -

    To invoke the mruby debugger, just type mrdb.

    - -

    To specify the script file:

    - -
    $ mrdb [option] file name
    -
    - -

    For example: Debugging sample.rb

    - -
    $ mrdb sample.rb
    -
    - -

    You can execute the shell commands listed below:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    commanddescription
    runexecute programs
    stepexecute stepping
    continueexecute continuing program
    breakconfigure the breaking point
    deletedeleting the breaking points
    disabledisabling the breaking points
    enableenabling the breaking points
    info breakpointsshowing list of the breaking points
    printevaluating and printing the values of the mruby expressions in the script
    listdisplaying the source cords
    helpshowing help
    quitterminating the mruby debugger
    - -

    2.2.2 Debugging mruby Binary Files (mrb file) with mrdb

    - -

    You can debug the mruby binary files.

    - -

    2.2.2.1 Debugging the binary files

    -
    • -

      notice To debug mruby binary files, you need to compile mruby files with option -g.

      -
    - -
    $ mrbc -g sample.rb
    -
    - -

    You can debug the mruby binary files with following command and the option -b.

    - -
    $ mrdb -b sample.mrb
    -
    - -

    Then you can execute all debugger shell commands.

    - -

    Break Command

    - -

    You can use any breakpoint to stop the program by specifying the line number and method name. The breakpoint list will be displayed after you have set the breakpoint successfully.

    - -

    Usage:

    - -
    break [file:]linenum
    -b [file:]linenum
    -break [class:]method
    -b [class:]method
    -
    - -

    The breakpoint will be ordered in serial from 1. The number, which was given to the deleted breakpoint, will never be given to another breakpoint again.

    - -

    You can give multiple breakpoints to the specified the line number and method. Be aware that the breakpoint command will not check the validity of the class name and method name.

    - -

    You can get the current breakpoint information by the following options.

    - -

    breakpoint breakpoint number : file name. line number

    - -

    breakpoint breakpoint number : [class name,] method name

    - -

    Continue Command

    - -

    Usage:

    - -
    continue [N]
    -c [N]
    -
    - -

    N: the next breakpoint number

    - -

    When resuming the program, it will stop at breakpoint N (N-1 breakpoint will be ignored).

    - -

    When you run the continue command without specifying N, the program will be stopped at the next breakpoint.

    - -

    Example:

    - -
    (foo.rb:1) continue 3
    -
    - -

    This will resume the program and stop it at the third breakpoint.

    - -

    Delete Command

    - -

    This will delete the specified breakpoint.

    - -

    Usage:

    - -
    delete [breakpoint-no]
    -d [breakpoint-no]
    -
    - -

    breakpoint-no: breakpoint number

    - -

    Example:

    - -
    (foo.rb:1) delete
    -
    - -

    This will delete all the breakpoints.

    - -
    (foo.rb:1) delete 1 3
    -
    - -

    This will delete the breakpoint at 1 and 3.

    - -

    Disable Command

    - -

    This will disable the specified breakpoint.

    - -

    Usage:

    - -
    disable [breakpoint-no]
    -dis [breakpoint-no]
    -
    - -

    reappointing: breakpoint number

    - -

    Example:

    - -
    (foo.rb:1) disable
    -
    - -

    Use disable if you would like to disable all the breakpoints.

    - -
    (foo.rb:1) disable 1 3
    -
    - -

    This will disable the breakpoints at 1 and 3.

    - -

    Enable Command

    - -

    This will enable the specified breakpoints.

    - -

    Usage:

    - -
    enable [breakpoint-no]
    -e [breakpoint-no]
    -
    - -

    breakpoint-no: breakpoint number

    - -

    Example:

    - -
    (foo.rb:1) enable
    -
    - -

    Enabling all breakpoints

    - -
    (foo.rb:1) enable 1 3
    -
    - -

    Enabling the breakpoint 1 and 3

    - -

    eval command

    - -

    Evaluating the string as source code and printing the value.

    - -

    Same as print command, please see print command.

    - -

    help command

    - -

    Displaying the help message.

    - -

    Usage:

    - -
    help [command]
    -h [command]
    -
    - -

    Typing help without any options will display the command list.

    - -

    Info Breakpoints Command

    - -

    Displaying the specified breakpoint information.

    - -

    Usage:

    - -
    info breakpoints [breakpoint-no]
    -i b [breakpoint-no]
    -
    - -

    breakpoint-no: breakpoint number

    - -

    Typing “info breakpoints” without ant option will display all breakpoint information. Example:

    - -
    (sample.rb:1) info breakpoints
    -Num     Type           Enb What
    -1       breakpoint     y   at sample.rb:3                      -> file name,line number
    -2       breakpoint     n   in Sample_class:sample_class_method -> [class:]method name
    -3       breakpoint     y   in sample_global_method
    -
    - -

    Displaying the specified breakpoint number:

    - -
    (foo.rb:1) info breakpoints 1 3
    -Num     Type           Enb What
    -1       breakpoint     y   at sample.rb:3
    -3       breakpoint     y   in sample_global_method
    -
    - -

    List Command

    - -

    To display the code of the source file.

    - -

    Usage:

    - -
    list [filename:]first[,last]
    -l [filename]:first[,last]
    -
    - -

    first: the opening row number last : the closing row number

    - -

    When you specify the first, but not the last option, you will receive 10 rows. When you do not specify both the first and last options, you will receive the next 10 rows.

    - -

    Example:

    - -
    Specifying file name and first row number
    -sample.rb:1) list sample2.rb:5
    -
    - -

    Specifying the file name and the first and last row number:

    - -
    (sample.rb:1) list sample2.rb:6,7
    -
    - -

    Print Command

    - -

    Evaluating the string as source code and printing the value.

    - -

    Usage:

    - -
    print [expr]
    -p [expr]
    -
    - -

    expr: expression

    - -

    The expression is mandatory. The displayed expressions will be serially ordered from 1. If an exception occurs, the exception information will be displayed, and the debugging will be continued.

    - -

    Example:

    - -
    (sample.rb:1) print 1+2
    -$1 = 3
    -(sample.rb:1) print self
    -$2 = main
    -
    - -

    Below is the case of the exception:

    - -
    (sample.rb:1) print (1+2
    -$1 =  SyntaxError: line 1: syntax error, unexpected $end, expecting ')'
    -
    - -

    Quit Command

    - -

    Quitting the debugger.

    - -

    Usage:

    - -
    quit
    -q
    -
    - -

    Run Command

    - -

    Running the program and stopping at the first breakpoint.

    - -

    Usage:

    - -
    run
    -r
    -
    - -

    Step Command

    - -

    This will run the program step by step. When the method and the block are invoked, the program will stop at the first row. The program, which is developed in C, will be ignored.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.gc-arena-howto.html b/docs/api/file.gc-arena-howto.html deleted file mode 100644 index 91e3f4a..0000000 --- a/docs/api/file.gc-arena-howto.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - File: gc-arena-howto - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    How to use mrb_gc_arena_save()/mrb_gc_arena_restore()/mrb_gc_protect()

    - -

    This is an English translation of blog post[https://www.rubyist.net/~matz/20130731.html] written in Japanese. Some parts are updated to reflect recent changes.

    - -

    When you are extending mruby using C language, you may encounter mysterious “arena overflow error” or memory leak or very slow execution speed. This is an error indicating overflow of “GC arena” implementing “conservative GC”.

    - -

    GC (garbage collector) must ensure that object is “alive”, in other words, that it is referenced by somewhere from the program. This can be determined by checking if the object can be directly or indirectly referenced by root. The local variables, global variables and constants etc. are root.

    - -

    If program execution is performed inside mruby VM, there is nothing to worry about because GC can access all roots owned by the VM.

    - -

    The problem arises when executing C functions. The object referenced by C variable is also “alive”, but mruby GC cannot aware of this, so it might mistakenly recognize the objects referenced by only C variables as dead.

    - -

    This can be a fatal bug if the GC tries to collect a live object.

    - -

    In CRuby, we scan C stack area, and use C variable as root to check whether object is alive or not. Of course, because we are accessing C stack just as memory region, we never know it is an integer or a pointer. We work around this by assuming that if it looks like a pointer, then assume it as a pointer. We call it “conservative”.

    - -

    By the way, CRuby’s “conservative GC” has some problems.

    - -

    The biggest problem is we have no way to access to the stack area in portable way. Therefore, we cannot use this method if we’d like to implement highly portable runtime, like mruby.

    - -

    So we came up with another plan to implement “conservative GC” in mruby.

    - -

    Again, the problem is when an object which was created in C function, becomes no longer referenced in the Ruby world, and cannot be treated as garbage.

    - -

    In mruby, we recognize all objects created in C function are alive. Then we have no problem such as confusing a live object as dead.

    - -

    This means that because we cannot collect a truly dead object, we may lose efficiency, but as a trade-off the GC itself is highly portable. We can say goodbye to the problem that GC deletes live objects due to optimization which sometimes occurs in CRuby.

    - -

    According to this idea, we have a table, called “GC arena”, which remembers objects created in C function.

    - -

    The arena is stack structure, when C function execution is returned to mruby VM, all objects registered in the arena are popped.

    - -

    This works very well, but can cause another problem: “arena overflow error” or memory leak.

    - -

    As of this writing, mruby automatically extend arena to remember objects (See MRB_GC_FIXED_ARENA and MRB_GC_ARENA_SIZE in doc/guides/mrbconf.md).

    - -

    If you create many objects in C functions, memory usage will increase, since GC never kicks in. This memory usage may look like memory leaks, but will also make execution slower as more memory will need to be allocated.

    - -

    With the build time configuration, you can limit the maximum size of arena (e.g., 100). Then if you create many objects, arena overflows, thus you will get an “arena overflow error”.

    - -

    To work around these problems, we have mrb_gc_arena_save() and mrb_gc_arena_restore() functions.

    - -

    int mrb_gc_arena_save(mrb) returns the current position of the stack top of GC arena, and void mrb_gc_arena_restore(mrb, idx) sets the stack top position to back to given idx.

    - -

    We can use them like this:

    - -
    int arena_idx = mrb_gc_arena_save(mrb);
    -
    -// ...create objects...
    -mrb_gc_arena_restore(mrb, arena_idx);
    -
    - -

    In mruby, C function calls are surrounded by this save/restore, but we can further optimize memory usage by surrounding save/restore, and can avoid creating arena overflow bugs.

    - -

    Let’s take a real example. Here is the source code of Array#inspect:

    - -
    static mrb_value
    -inspect_ary(mrb_state *mrb, mrb_value ary, mrb_value list)
    -{
    -  mrb_int i;
    -  mrb_value s, arystr;
    -  char head[] = { '[' };
    -  char sep[] = { ',', ' ' };
    -  char tail[] = { ']' };
    -
    -  /* check recursive */
    -  for (i=0; i<RARRAY_LEN(list); i++) {
    -    if (mrb_obj_equal(mrb, ary, RARRAY_PTR(list)[i])) {
    -      return mrb_str_new(mrb, "[...]", 5);
    -    }
    -  }
    -
    -  mrb_ary_push(mrb, list, ary);
    -
    -  arystr = mrb_str_new_capa(mrb, 64);
    -  mrb_str_cat(mrb, arystr, head, sizeof(head));
    -
    -  for (i=0; i<RARRAY_LEN(ary); i++) {
    -    int ai = mrb_gc_arena_save(mrb);
    -
    -    if (i > 0) {
    -      mrb_str_cat(mrb, arystr, sep, sizeof(sep));
    -    }
    -    if (mrb_array_p(RARRAY_PTR(ary)[i])) {
    -      s = inspect_ary(mrb, RARRAY_PTR(ary)[i], list);
    -    }
    -    else {
    -      s = mrb_inspect(mrb, RARRAY_PTR(ary)[i]);
    -    }
    -    mrb_str_cat(mrb, arystr, RSTRING_PTR(s), RSTRING_LEN(s));
    -    mrb_gc_arena_restore(mrb, ai);
    -  }
    -
    -  mrb_str_cat(mrb, arystr, tail, sizeof(tail));
    -  mrb_ary_pop(mrb, list);
    -
    -  return arystr;
    -}
    -
    - -

    This is a real example, so slightly complicated, but bear with me. The essence of Array#inspect is that after stringifying each element of array using inspect method, we join them together so that we can get inspect representation of the entire array.

    - -

    After the inspect representation is created, we no longer require the individual string representation. This means that we don’t have to register these temporal objects into GC arena.

    - -

    Therefore, in order to keep the arena size small; the ary_inspect() function will do the following:

    -
    • -

      save the position of the stack top using mrb_gc_arena_save().

      -
    • -

      get inspect representation of each element.

      -
    • -

      append it to the constructing entire inspect representation of array.

      -
    • -

      restore stack top position using mrb_gc_arena_restore().

      -
    - -

    Please note that the final inspect representation of entire array was created before the call of mrb_gc_arena_restore(). Otherwise, required temporal object may be deleted by GC.

    - -

    We may have an usecase where after creating many temporal objects, we’d like to keep some of them. In this case, we cannot use the same idea in ary_inspect() like appending objects to existing one. Instead, after mrb_gc_arena_restore(), we must re-register the objects we want to keep in the arena using mrb_gc_protect(mrb, obj). Use mrb_gc_protect() with caution because it could also lead to an “arena overflow error”.

    - -

    We must also mention that when mrb_funcall is called in top level, the return value is also registered to GC arena, so repeated use of mrb_funcall may eventually lead to an “arena overflow error”.

    - -

    Use mrb_gc_arena_save() and mrb_gc_arena_restore() or possible use of mrb_gc_protect() to workaround this.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.hier.html b/docs/api/file.hier.html deleted file mode 100644 index 5df9c1d..0000000 --- a/docs/api/file.hier.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - File: hier - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    The mruby directory structure

    - -
    +- 💎 mruby/                    The top directory of mruby.
    -    |
    -    +- 📁 .github/              GitHub configuration files for mruby project management.
    -    |
    -    +- 📁 benchmark/            Benchmarking files for mruby.
    -    |
    -    +- 📁 bin/                  Links to temporary executables after build. Auto-created.
    -    |
    -    +- 📁 build/                Default build output destination for mruby. Auto-created.
    -    |   |
    -    |   +- 📁 repos/            The git clone destination directory for GEMs that depend on the build configuration.
    -    |   |
    -    |   +- 📁 host/             The "host" build output directory.
    -    |
    -    +- 📁 build_config/         Build configuration files for various environments.
    -    |
    -    +- 📁 doc/                  Documentation for mruby.
    -    |   |
    -    |   +- 📁 guides/           Documentation for general users.
    -    |   |
    -    |   +- 📁 internal/         Documentation for internal implementations for developers.
    -    |
    -    +- 📁 examples/             Examples of mruby usages.
    -    |   |
    -    |   +- 📁 mrbgems/          Examples for creating custom GEM for mruby.
    -    |
    -    +- 📁 include/              C header files required when using mruby.
    -    |
    -    +- 📁 lib/                  Ruby scripts used for building mruby.
    -    |
    -    +- 📁 mrbgems/              A library collection of features not provided by mruby core only.
    -    |   |                       See doc/guides/mrbgems.md file
    -    |   |
    -    |   +- 📁 mruby-*/          The directory of each GEMs.
    -    |   |
    -    |   +- 📃 *.gembox          A collection of GEMs grouped by features and purposes.
    -    |
    -    +- 📁 mrblib/               The core Ruby scripts that makes up the main body of mruby.
    -    |
    -    +- 📁 oss-fuzz/             Source code for The fuzzing-test.
    -    |                           See https://github.com/google/oss-fuzz
    -    |
    -    +- 📁 src/                  The core C source code that makes up the main body of mruby.
    -    |
    -    +- 📁 tasks/                Rake tasks at build-time.
    -    |   |
    -    |   +- 📁 toolchains/       Definitions for the compiler, linker, archiver, etc. for each toolchain.
    -    |
    -    +- 📁 test/                 Ruby scripts needed for testing mruby.
    -    |   |
    -    |   +- 📁 t/                mruby test cases.
    -    |
    -    +- 📁 tools/                External programs used for the mruby project.
    -        |
    -        +- 📁 lrama/            LALR parser generator as an alternative to bison.
    -                                Import from https://github.com/ruby/lrama
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.limitations.html b/docs/api/file.limitations.html deleted file mode 100644 index df3e924..0000000 --- a/docs/api/file.limitations.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - File: limitations - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    Limitations and Differences

    - -

    The philosophy of mruby is to be a lightweight implementation of the Ruby ISO standard. These two objectives are partially contradicting. Ruby is an expressive language with complex implementation details which are difficult to implement in a lightweight manner. To cope with this, limitations to the “Ruby Compatibility” are defined.

    - -

    This document is collecting these limitations.

    - -

    Integrity

    - -

    This document does not contain a complete list of limitations. Please help to improve it by submitting your findings.

    - -

    Kernel.raise in rescue clause

    - -

    Kernel.raise without arguments does not raise the current exception within a rescue clause.

    - -
    begin
    -  1 / 0
    -rescue
    -  raise
    -end
    -
    - -

    Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]

    - -

    ZeroDivisionError is raised.

    - -

    mruby [3.1.0 (2022-05-12)]

    - -

    RuntimeError is raised instead of ZeroDivisionError. To re-raise the exception, you have to do:

    - -
    begin
    -  1 / 0
    -rescue => e
    -  raise e
    -end
    -
    - -

    Fiber execution can’t cross C function boundary

    - -

    mruby’s Fiber is implemented similarly to Lua’s co-routine. This results in the consequence that you can’t switch context within C functions. Only exception is mrb_fiber_yield at return.

    - -

    Array does not support instance variables

    - -

    To reduce memory consumption Array does not support instance variables.

    - -
    class Liste < Array
    -  def initialize(str = nil)
    -    @field = str
    -  end
    -end
    -
    -p Liste.new "foobar"
    -
    - -

    Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]

    - -

    []

    - -

    mruby [3.1.0 (2022-05-12)]

    - -

    ArgumentError is raised.

    - -

    defined?

    - -

    The defined? keyword is considered too complex to be fully implemented. It is recommended to use const_defined? and other reflection methods instead.

    - -
    defined?(Foo)
    -
    - -

    Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]

    - -
    nil
    -
    - -

    mruby [3.1.0 (2022-05-12)]

    - -

    NameError is raised.

    - -

    alias on global variables

    - -

    Aliasing a global variable works in CRuby but is not part of the ISO standard.

    - -
    alias $a $__a__
    -
    - -

    Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]

    - -

    nil

    - -

    mruby [3.1.0 (2022-05-12)]

    - -

    Syntax error

    - -

    Operator modification

    - -

    An operator can’t be overwritten by the user.

    - -
    class String
    -  def +
    -  end
    -end
    -
    -'a' + 'b'
    -
    - -

    Ruby [ruby 2.0.0p645 (2015-04-13 revision 50299)]

    - -

    ArgumentError is raised. The re-defined + operator does not accept any arguments.

    - -

    mruby [3.1.0 (2022-05-12)]

    - -

    'ab' Behavior of the operator wasn’t changed.

    - -

    Kernel#binding is not supported until [3.0.0 (2021-03-05)]

    - -

    Kernel#binding method is not supported.

    - -

    Ruby [ruby 2.5.1p57 (2018-03-29 revision 63029)]

    - -
    $ ruby -e 'puts Proc.new {}.binding'
    -#<Binding:0x00000e9deabb9950>
    -
    - -

    nil? redefinition in conditional expressions

    - -

    Redefinition of nil? is ignored in conditional expressions.

    - -
    a = "a"
    -def a.nil?
    -  true
    -end
    -puts(a.nil? ? "truthy" : "falsy")
    -
    - -

    Ruby outputs truthy. mruby outputs falsy.

    - -

    Argument Destructuring

    - -
    def m(a,(b,c),d); p [a,b,c,d]; end
    -m(1,[2,3],4)  # => [1,2,3,4]
    -
    - -

    Destructured arguments (b and c in above example) cannot be accessed from the default expression of optional arguments and keyword arguments, since actual assignment is done after the evaluation of those default expressions. Thus:

    - -
    def f(a,(b,c),d=b)
    -  p [a,b,c,d]
    -end
    -f(1,[2,3])
    -
    - -

    CRuby gives [1,2,3,nil]. mruby raises NoMethodError for b.

    - -

    Keyword argument expansion has similar restrictions. The following example, gives [1, 1] for CRuby, mruby raises NoMethodError for b.

    - -
    def g(a: 1, b: a)
    -  p [a,b]
    -end
    -g(a:1)
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.link.html b/docs/api/file.link.html deleted file mode 100644 index fe29a54..0000000 --- a/docs/api/file.link.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - File: link - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    Linking libmruby to your application

    - -

    You have two ways to link libmruby to your application.

    -
    • -

      using executable gem.

      -
    • -

      using normal compilation process

      -
    - -

    Executable Gems

    - -

    If your application is relatively small, mrbgem is an easier way to create the executable. By tradition, the gem name start with mruby-bin-, e.g. mruby-bin-debugger.

    - -

    mrbgem.rake file

    - -

    The executable name is specified in mrbgem.rake file at the top of your mrbgem directory.

    - -
    MRuby::Gem::Specification.new('mruby-bin-example') do |spec|
    -  spec.license = 'MIT'
    -  spec.author  = 'mruby developers'
    -  spec.summary = 'Example for executable command gem'
    -  spec.bins = %w(mruby-example)    # <- this is binary name
    -end
    -
    - -

    Source tree structure

    - -

    The source file for the gem executable should be in <gem-name>/tools/<bin-name>. Currently, we support C or C++ source code (.c, .cpp, .cxx, .cc) for the executable. Ruby source files are not supported. Put the functionality in the different gem and specify dependency to it in mrbgem.rake.

    - -

    Normal compilation process

    - -

    The libmruby is a normal library so that you can just link it to your application. Specify proper compiler options (-I etc.) and linker options (-lmruby etc.) to compile and link your application. Specify those options in your build script (e.g. Makefile).

    - -

    Compiler options

    - -

    You need to specify compiler options that are compatible to mruby configuration, for example:

    -
    • -

      -I to specify the place for mruby header files

      -
    • -

      -D to specify mruby configuration macros

      -
    - -

    To retrieve compiler options used to build mruby, you can use mruby-config command with following options:

    -
    • -

      --cc compiler name

      -
    • -

      --cflags options passed to compiler

      -
    - -
    $ mruby-config --cflags
    --std=gnu99 -g -O3 -Wall -DMRB_GC_FIXED_ARENA -I/home/matz/work/mruby/include -I/home/matz/work/mruby/build/host/include
    -
    - -

    Linker options

    - -

    Just like compiler options, you need to specify linker options that are compatible to mruby configuration.

    - -

    To retrieve linker options, you can use mruby-config with following options:

    -
    • -

      --ld linker name

      -
    • -

      --ldflags options passed to linker

      -
    • -

      --ldflags-before-libs options passed to linker before linked libraries

      -
    • -

      --libs linked libraries

      -
    - -
    $ mruby-config --ldflags
    --L/home/matz/work/mruby/build/host/lib
    -
    -$ mruby-config --ldflags-before-libs
    -# <nothing in this case>
    -
    -$ mruby-config --libs
    --lmruby -lm
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.memory.html b/docs/api/file.memory.html deleted file mode 100644 index c628d29..0000000 --- a/docs/api/file.memory.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - File: memory - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    Memory Allocation

    - -

    There are three methods to customize memory allocation in mruby.

    -
    1. -

      Provide your own realloc()/free()

      -
    2. -

      Redefine mrb_default_allocf()

      -
    3. -

      Specify a function with mrb_open_allocf()

      -
    - -

    Provide your own realloc()/free()

    - -

    On some platforms, especially on microcontrollers, the standard library may not provide malloc(), realloc(), and free(). In such cases, it may be necessary to define memory allocation functions for the specific platform. mruby uses realloc() and free() from the standard C library for memory management. By defining these two functions of your own, you can make mruby work. However, note the following two points:

    - -

    First, realloc(NULL, size) behaves the same as malloc(size). Second, free(NULL) exits without doing anything.

    - -

    Redefine mrb_default_allocf()

    - -

    The only function in mruby that uses the standard C library’s memory allocation functions is mrb_default_allocf(), defined in alloc.c. By defining this function within your application, you can customize the memory management of your application.

    - -

    Specify a function with mrb_open_allocf()

    - -

    If you want to perform different memory management for each mrb_state within your application, you can use the mrb_open_allocf() function to create the mrb_state structure. This allows you to specify a memory allocation function (which is compatible with mrb_default_allocf) for each mrb_state. Although this scheme is not recommended. It may become obsolete in the future, since I have never seen per mrb_state memory management use-case.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mrbconf.html b/docs/api/file.mrbconf.html deleted file mode 100644 index 8ae48d9..0000000 --- a/docs/api/file.mrbconf.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - - File: mrbconf - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    mruby configuration macros

    - -

    The configuration file

    - -

    You can do the build configuration in the build configuration file. The default configuration file is build_config/default.rb.

    - -

    You can specify your own configuration file by the MRUBY_CONFIG environment variable (you can use CONFIG for shorthand for MRUBY_CONFIG). If the path doesn’t exist, build_config/${MRUBY_CONFIG}.rb is used.

    - -

    How to use these macros

    - -

    Just add the configuration value to the MRuby::Build#defines attribute. This is the same for MRuby::CrossBuild.

    - -
    # build_config.rb
    -
    -MRuby::Build.new do |conf|
    -  ...
    -  conf.defines << 'MRB_GC_FIXED_ARENA'
    -  conf.defines << 'MRB_NO_METHOD_CACHE'
    -  ...
    -end
    -
    - -

    NOTE

    -
    • -

      Use common definitions (conf.defines) instead of per-compiler definitions (e.g., conf.cc.defines) unless there is a special reason not to.

      -
    • -

      It is now deprecated to edit the include/mruby/mrbconf.h file or give it directly as a compiler flag, as was the case before.

      -
    - -

    stdio setting

    - -

    MRB_NO_STDIO

    -
    • -

      When defined <stdio.h> functions won’t be used.

      -
    • -

      Some features will be disabled when this is enabled:

      -
    • -

      mrb_irep load/dump from/to file.

      -
    • -

      Compiling mruby script from a file.

      -
    • -

      Printing features in src/print.c.

      -
    - -

    Debug macros

    - -

    MRB_USE_DEBUG_HOOK

    -
    • -

      When defined code fetch hook and debug OP hook will be enabled.

      -
    • -

      When using any of the hook set function pointer code_fetch_hook and/or debug_op_hook of mrb_state.

      -
    • -

      Fetch hook will be called before any OP.

      -
    • -

      Debug OP hook will be called when dispatching OP_DEBUG.

      -
    - -

    MRB_DEBUG

    -
    • -

      When defined mrb_assert* macro will be defined with macros from <assert.h>.

      -
    • -

      Could be enabled via enable_debug method of MRuby::Build.

      -
    - -

    Stack configuration

    - -

    MRB_STACK_EXTEND_DOUBLING

    -
    • -

      If defined doubles the stack size when extending it.

      -
    • -

      Otherwise extends stack with MRB_STACK_GROWTH.

      -
    - -

    MRB_STACK_GROWTH

    -
    • -

      Default value is 128.

      -
    • -

      Used in stack extending.

      -
    • -

      Ignored when MRB_STACK_EXTEND_DOUBLING is defined.

      -
    - -

    MRB_STACK_MAX

    -
    • -

      Default value is 0x40000 - MRB_STACK_GROWTH.

      -
    • -

      Raises RuntimeError when stack size exceeds this value.

      -
    - -

    Primitive type configuration

    - -

    MRB_USE_FLOAT32

    -
    • -

      When defined single-precision floating-point type(C type float) is used as mrb_float.

      -
    • -

      Otherwise, double-precision floating-point type(C type double) is used as mrb_float.

      -
    - -

    MRB_NO_FLOAT

    -
    • -

      When defined removes floating-point numbers from mruby.

      -
    • -

      It makes mruby easier to handle in “Micro-controller without FPU” and “Kernel Space”.

      -
    - -

    MRB_INT32

    -
    • -

      When defined, or MRB_INT64 are not defined on 32-bit CPU mode, mrb_int will be defined as int32_t.

      -
    • -

      Conflicts with MRB_INT64.

      -
    - -

    MRB_INT64

    -
    • -

      When defined, or MRB_INT32 are not defined on 64-bit CPU mode, mrb_int will be defined as int64_t.

      -
    • -

      Conflicts with MRB_INT32.

      -
    - -

    Garbage collector configuration

    - -

    MRB_GC_STRESS

    -
    • -

      When defined full GC is emitted per each RBasic allocation.

      -
    • -

      Mainly used in memory manager debugging.

      -
    • -

      If defined at the same time as MRB_DEBUG, full GC is emitted also per each heap allocation (mrb_malloc() or etc.). This configuration slows down mruby execution by a factor of 2 to 3 or even more.

      -
    - -

    MRB_GC_TURN_OFF_GENERATIONAL

    -
    • -

      When defined turns generational GC off by default.

      -
    - -

    MRB_GC_FIXED_ARENA

    -
    • -

      When defined used fixed size GC arena.

      -
    • -

      Raises RuntimeError when this is defined and GC arena size exceeds MRB_GC_ARENA_SIZE.

      -
    • -

      Useful tracking unnecessary mruby object allocation.

      -
    - -

    MRB_GC_ARENA_SIZE

    -
    • -

      Default value is 100.

      -
    • -

      Ignored when MRB_GC_FIXED_ARENA isn’t defined.

      -
    • -

      Defines fixed GC arena size.

      -
    - -

    MRB_HEAP_PAGE_SIZE

    -
    • -

      Default value is 1024.

      -
    • -

      Specifies number of RBasic per each heap page.

      -
    • -

      To calculate the number of bytes per heap page, it is “(size of management data per heap page) + (size per object) * MRB_HEAP_PAGE_SIZE”. In mruby 3.1.0, the “size of management data per heap page” is 6 words, also “size per object” is 6 words. For a 32-bit CPU, (6 * 4) + (6 * 4) * MRB_HEAP_PAGE_SIZE gives the bytes of size per heap page. Conversely, for example, to keep the size per heap page to 4 Ki bytes, calculate (4096 - (6 * 4)) / (6 * 4) to specify MRB_HEAP_PAGE_SIZE=169.

      -
    - -

    Memory pool configuration

    - -

    POOL_ALIGNMENT

    -
    • -

      Default value is 4.

      -
    • -

      If you’re allocating data types that requires alignment more than default value define the largest value of required alignment.

      -
    - -

    POOL_PAGE_SIZE

    -
    • -

      Default value is 16000.

      -
    • -

      Specifies page size of pool page.

      -
    • -

      Smaller the value is increases memory overhead.

      -
    - -

    State atexit configuration

    - -

    MRB_FIXED_STATE_ATEXIT_STACK

    -
    • -

      If defined enables fixed size mrb_state atexit stack.

      -
    • -

      Raises RuntimeError when mrb_state_atexit call count to same mrb_state exceeds MRB_FIXED_STATE_ATEXIT_STACK_SIZE‘s value.

      -
    - -

    MRB_FIXED_STATE_ATEXIT_STACK_SIZE

    -
    • -

      Default value is 5.

      -
    • -

      If MRB_FIXED_STATE_ATEXIT_STACK isn’t defined this macro is ignored.

      -
    - -

    mrb_value configuration

    - -

    MRB_ENDIAN_BIG

    -
    • -

      If defined compiles mruby for big endian machines.

      -
    • -

      Used in MRB_NAN_BOXING.

      -
    • -

      Some mrbgem use this mrbconf.

      -
    - -

    MRB_NAN_BOXING

    -
    • -

      If defined represent mrb_value in boxed double.

      -
    • -

      Conflicts with MRB_USE_FLOAT32 and MRB_NO_FLOAT.

      -
    - -

    MRB_WORD_BOXING

    -
    • -

      If defined represent mrb_value as a word.

      -
    • -

      If defined Float will be a mruby object with RBasic.

      -
    - -

    Reduce heap memory configuration

    - -

    MRB_USE_ETEXT_RO_DATA_P

    -
    • -

      Use etext and edata section addresses defined by the linker to detect read-only data.

      -
    • -

      Those addresses are widely available, but not portable, nor standardized.

      -
    • -

      This macro is defined by default on User-mode Linux.

      -
    - -

    MRB_NO_DEFAULT_RO_DATA_P

    -
    • -

      Define this macro when the default mrb_ro_data_p() does not work for any reason.

      -
    - -

    MRB_USE_CUSTOM_RO_DATA_P

    -
    • -

      Please try if MRB_USE_LINK_TIME_RO_DATA_P is not available.

      -
    • -

      The mrb_ro_data_p() function is implemented by the user in an arbitrary file.

      -
    • -

      The prototype declaration is mrb_bool mrb_ro_data_p(const char *ptr).

      -
    • -

      Return TRUE if ptr is in the read-only section, otherwise return FALSE.

      -
    - -

    Other configuration

    - -

    MRB_MALLOC_TRIM

    -
    • -

      call malloc_trim(0) for each mrb_full_gc() call

      -
    - -

    MRB_UTF8_STRING

    -
    • -

      Adds UTF-8 encoding support to character-oriented String instance methods.

      -
    • -

      If it isn’t defined, they only support the US-ASCII encoding.

      -
    - -

    MRB_STR_LENGTH_MAX

    -
    • -

      The maximum length of strings (default 1MB)

      -
    • -

      set this value to zero to skip the check

      -
    - -

    MRB_ARY_LENGTH_MAX

    -
    • -

      The maximum length of arrays (default 1MB)

      -
    • -

      set this value to zero to skip the check

      -
    - -

    MRB_FUNCALL_ARGC_MAX

    -
    • -

      Default value is 16.

      -
    • -

      Specifies 4th argument(argc) max value of mrb_funcall.

      -
    • -

      Raises ArgumentError when the argc argument is bigger then this value mrb_funcall.

      -
    - -

    KHASH_DEFAULT_SIZE

    -
    • -

      Default value is 32.

      -
    • -

      Specifies default size of khash table bucket.

      -
    • -

      Used in kh_init_ ## name function.

      -
    - -

    MRB_NO_METHOD_CACHE

    -
    • -

      Disable method cache to save memory.

      -
    - -

    MRB_METHOD_CACHE_SIZE

    -
    • -

      Default value is 256.

      -
    • -

      Ignored if MRB_NO_METHOD_CACHE is defined.

      -
    • -

      Need to be the power of 2.

      -
    - -

    MRB_USE_ALL_SYMBOLS

    -
    • -

      Make it available Symbol.all_symbols in mrbgems/mruby-symbol-ext

      -
    • -

      Increase heap memory usage.

      -
    - -

    MRB_USE_VM_SWITCH_DISPATCH

    -
    • -

      Turn on switch dispatch in VM loop

      -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mrbgems.html b/docs/api/file.mrbgems.html deleted file mode 100644 index 50a2c34..0000000 --- a/docs/api/file.mrbgems.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - - File: mrbgems - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    mrbgems

    - -

    mrbgems is a library manager to integrate C and Ruby extensions in an easy and standardised way into mruby. Conventionally, each mrbgem name is prefixed by mruby-, e.g. mruby-time for a gem that provides Time class functionality.

    - -

    Usage

    - -

    You have to activate mrbgems explicitly in your build configuration. To add a gem, add the following line to your build configuration file, for example:

    - -
    conf.gem '/path/to/your/gem/dir'
    -
    - -

    You can also use a relative path to specify a gem.

    - -
    conf.gem 'examples/mrbgems/ruby_extension_example'
    -
    - -

    In that case,

    -
    • -

      if your build configuration file is in the build_config directory, it’s relative from MRUBY_ROOT.

      -
    • -

      otherwise, it is relative from the directory where your build configuration is.

      -
    - -

    A remote GIT repository location for a GEM is also supported:

    - -
    conf.gem :git => 'https://github.com/masuidrive/mrbgems-example.git', :branch => 'master'
    -conf.gem :github => 'masuidrive/mrbgems-example', :branch => 'master'
    -conf.gem :bitbucket => 'mruby/mrbgems-example', :branch => 'master'
    -
    - -

    NOTE: :bitbucket option supports only git. Hg is unsupported in this version.

    - -

    You can specify the subdirectory of the repository with :path option:

    - -
    conf.gem github: 'mruby/mruby', path: 'mrbgems/mruby-socket'
    -
    - -

    To use mrbgem from mgem-list use :mgem option:

    - -
    conf.gem :mgem => 'mruby-yaml'
    -conf.gem :mgem => 'yaml' # 'mruby-' prefix could be omitted
    -
    - -

    For specifying the commit hash to checkout use :checksum_hash option:

    - -
    conf.gem mgem: 'mruby-redis', checksum_hash: '3446d19fc4a3f9697b5ddbf2a904f301c42f2f4e'
    -
    - -

    If there are missing dependencies, mrbgem dependencies solver will reference mrbgem from the core or mgem-list.

    - -

    Note that if more than one git-based gem has the same base name (i.e. the default checkout directory name), it is (now) an error UNLESS they have the same repository URL, branch name and commit-id (i.e. checksum hash). You can bypass this by explicitly importing your preferred version first and setting the canonical: option to true:

    - -
    conf.gem github: 'me/mruby-yaml', branch: 'my-hacked-branch', canonical: true
    -
    - -

    If you do this, the system will (mostly) silently ignore other attempts to clone a gem with this name.

    - -

    Note that this only affects cloning the gem from git. It does not resolve version conflicts. If the version as specified in the gem’s rakefile is incompatible with a dependency, your build will still fail.

    - -

    Tweak the gem in your build configuration file

    - -

    You can give blocks in the conf.gem call to make adjustments for environments where the original gem does not expect them:

    - -
    conf.gem core: "mruby-bin-mirb" do |g|
    -  # For cross build to NetBSD
    -  g.linker.libraries = %w(edit termcap)
    -end
    -
    - -

    However, it should be used with caution, as it may deviate from the intent of the gem’s author.

    - -

    Gem Testing

    - -

    If you enable unit tests in your build with enable_test, tests will be generated for all gems and their dependencies by default. If necessary, it is possible to suppress tests for a specific gem like so:

    - -
    conf.gem 'mruby-noisygem' do |g|
    -  g.skip_test = true
    -end
    -
    - -

    However, it is considered best practice to leave all tests enabled whenever possible. A warning message will be generated for each gem with disabled tests.

    - -

    GemBox

    - -

    There are instances when you wish to add a collection of mrbgems into mruby at once, or be able to substitute mrbgems based on configuration, without having to add each gem to your build configuration file. A packaged collection of mrbgems is called a GemBox. A GemBox is a file that contains a list of mrbgems to load into mruby, in the same format as if you were adding them to the build config via config.gem, but wrapped in an MRuby::GemBox object. GemBoxes are loaded into mruby via config.gembox 'boxname'.

    - -

    Below we have created a GemBox containing mruby-time and mrbgems-example:

    - -
    MRuby::GemBox.new do |conf|
    -  conf.gem "#{root}/mrbgems/mruby-time"
    -  conf.gem :github => 'masuidrive/mrbgems-example'
    -end
    -
    - -

    As mentioned, the GemBox uses the same conventions as MRuby::Build. The GemBox must be saved with a .gembox extension inside the mrbgems directory to be picked up by mruby.

    - -

    To use this example GemBox, we save it as custom.gembox inside the mrbgems directory in mruby, and add the following to your build configuration file inside the build block:

    - -
    conf.gembox 'custom'
    -
    - -

    This will cause the custom GemBox to be read in during the build process, adding mruby-time and mrbgems-example to the build.

    - -

    If you want, you can put GemBox outside the mruby directory. In that case you must specify an absolute path like below.

    - -
    conf.gembox "#{ENV["HOME"]}/mygemboxes/custom"
    -
    - -

    There are two GemBoxes that ship with mruby: default and full-core. The default GemBox contains several core components of mruby, and full-core contains every gem found in the mrbgems directory.

    - -

    GEM Structure

    - -

    The maximal GEM structure looks like this:

    - -
    +- GEM_NAME             <- Name of GEM
    -    |
    -    +- README.md        <- Readme for GEM
    -    |
    -    +- mrbgem.rake      <- GEM Specification
    -    |
    -    +- include/         <- Header for Ruby extension (will exported)
    -    |
    -    +- mrblib/          <- Source for Ruby extension
    -    |
    -    +- src/             <- Source for C extension
    -    |
    -    +- tools/           <- Source for Executable (in C)
    -    |
    -    +- test/            <- Test code (Ruby)
    -
    - -

    The mrblib directory contains pure Ruby files to extend mruby. The src directory contains C/C++ files to extend mruby. The include directory contains C/C++ header files. The test directory contains C/C++ and pure Ruby files for testing purposes which will be used by mrbtest. mrbgem.rake contains the specification to compile C and Ruby files. README.md is a short description of your GEM.

    - -

    Build process

    - -

    mrbgems expects a specification file called mrbgem.rake inside of your GEM directory. A typical GEM specification could look like this for example:

    - -
    MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec|
    -  spec.license = 'MIT'
    -  spec.author  = 'mruby developers'
    -  spec.summary = 'Example mrbgem using C and Ruby'
    -end
    -
    - -

    The mrbgems build process will use this specification to compile Object and Ruby files. The compilation results will be added to lib/libmruby.a. This file exposes the GEM functionality to tools like mruby and mirb.

    - -

    The following properties can be set inside your MRuby::Gem::Specification for information purpose:

    -
    • -

      spec.license or spec.licenses (A single license or a list of them under which this GEM is licensed)

      -
    • -

      spec.author or spec.authors (Developer name or a list of them)

      -
    • -

      spec.version (Current version)

      -
    • -

      spec.description (Detailed description)

      -
    • -

      spec.summary

      -
    • -

      One line short description of mrbgem.

      -
    • -

      Printed in build summary of rake when set.

      -
    • -

      spec.homepage (Homepage)

      -
    • -

      spec.requirements (External requirements as information for user)

      -
    - -

    The license and author properties are required in every GEM!

    - -

    In case your GEM is depending on other GEMs please use spec.add_dependency(gem, *requirements[, default_get_info]) like:

    - -
    MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec|
    -  spec.license = 'MIT'
    -  spec.author  = 'mruby developers'
    -
    -  # Add GEM dependency mruby-parser.
    -  # The version must be between 1.0.0 and 1.5.2 .
    -  spec.add_dependency('mruby-parser', '>= 1.0.0', '<= 1.5.2')
    -
    -  # Use any version of mruby-uv from GitHub.
    -  spec.add_dependency('mruby-uv', '>= 0.0.0', :github => 'mattn/mruby-uv')
    -
    -  # Use latest mruby-onig-regexp from GitHub. (version requirements can be omitted)
    -  spec.add_dependency('mruby-onig-regexp', :github => 'mattn/mruby-onig-regexp')
    -
    -  # You can add extra mgems active only on test
    -  spec.add_test_dependency('mruby-process', :github => 'iij/mruby-process')
    -end
    -
    - -

    The version requirements and default gem information are optional.

    - -

    Version requirement supports following operators:

    -
    • -

      ‘=’: is equal

      -
    • -

      ‘!=’: is not equal

      -
    • -

      ‘>’: is greater

      -
    • -

      ‘<’: is lesser

      -
    • -

      ‘>=’: is equal or greater

      -
    • -

      ‘<=’: is equal or lesser

      -
    • -

      ‘~>’: is equal or greater and is lesser than the next major version

      -
    • -

      example 1: ‘~> 2.2.2’ means ‘>= 2.2.2’ and ‘< 2.3.0’

      -
    • -

      example 2: ‘~> 2.2’ means ‘>= 2.2.0’ and ‘< 3.0.0’

      -
    - -

    When more than one version requirements is passed, the dependency must satisfy all of it.

    - -

    You can have default gem to use as dependency when it’s not defined in your build configuration. When the last argument of add_dependency call is Hash, it will be treated as default gem information. Its format is same as argument of method MRuby::Build#gem, expect that it can’t be treated as path gem location.

    - -

    When a special version of dependency is required, use MRuby::Build#gem in the build configuration to override default gem.

    - -

    If you have conflicting GEMs use the following method:

    -
    • -

      spec.add_conflict(gem, *requirements)

      -
    • -

      The requirements argument is same as in add_dependency method.

      -
    - -

    like following code:

    - -
    MRuby::Gem::Specification.new 'some-regexp-binding' do |spec|
    -  spec.license = 'BSD'
    -  spec.author = 'John Doe'
    -
    -  spec.add_conflict 'mruby-onig-regexp', '> 0.0.0'
    -  spec.add_conflict 'mruby-hs-regexp'
    -  spec.add_conflict 'mruby-pcre-regexp'
    -  spec.add_conflict 'mruby-regexp-pcre'
    -end
    -
    - -

    In case your GEM has more complex build requirements you can use the following options additionally inside your GEM specification:

    -
    • -

      spec.cc.flags (C compiler flags)

      -
    • -

      spec.cc.defines (C compiler defines)

      -
    • -

      spec.cc.include_paths (C compiler include paths)

      -
    • -

      spec.linker.flags (Linker flags)

      -
    • -

      spec.linker.libraries (Linker libraries)

      -
    • -

      spec.linker.library_paths (Linker additional library path)

      -
    • -

      spec.bins (Generate binary file)

      -
    • -

      spec.rbfiles (Ruby files to compile)

      -
    • -

      spec.objs (Object files to compile)

      -
    • -

      spec.test_rbfiles (Ruby test files for integration into mrbtest)

      -
    • -

      spec.test_objs (Object test files for integration into mrbtest)

      -
    • -

      spec.test_preload (Initialization files for mrbtest)

      -
    - -

    You also can use spec.mruby.cc and spec.mruby.linker to add extra global parameters for the compiler and linker.

    - -

    include_paths and dependency

    - -

    Your GEM can export include paths to another GEMs that depends on your GEM. By default, /...absolute path.../{GEM_NAME}/include will be exported. So it is recommended not to put GEM’s local header files on include/.

    - -

    These exports are retroactive. For example: when B depends on C and A depends on B, A will get include paths exported by C.

    - -

    Exported include_paths are automatically appended to GEM local include_paths by rake. You can use spec.export_include_paths accessor if you want more complex build.

    - -

    C Extension

    - -

    mruby can be extended with C. This is possible by using the C API to integrate C libraries into mruby.

    - -

    Preconditions

    - -

    mrbgems expects that you have implemented a C method called mrb_YOURGEMNAME_gem_init(mrb_state). YOURGEMNAME will be replaced by the name of your GEM. If you call your GEM c_extension_example, your initialisation method could look like this:

    - -
    void
    -mrb_c_extension_example_gem_init(mrb_state* mrb) {
    -  struct RClass *class_cextension = mrb_define_module(mrb, "CExtension");
    -  mrb_define_class_method(mrb, class_cextension, "c_method", mrb_c_method, MRB_ARGS_NONE());
    -}
    -
    - -

    Finalize

    - -

    mrbgems expects that you have implemented a C method called mrb_YOURGEMNAME_gem_final(mrb_state). YOURGEMNAME will be replaced by the name of your GEM. If you call your GEM c_extension_example, your finalizer method could look like this:

    - -
    void
    -mrb_c_extension_example_gem_final(mrb_state* mrb) {
    -  free(someone);
    -}
    -
    - -

    Example

    - -
    +- c_extension_example/
    -    |
    -    +- README.md        (Optional)
    -    |
    -    +- src/
    -    |   |
    -    |   +- example.c    <- C extension source
    -    |
    -    +- test/
    -    |   |
    -    |   +- example.rb   <- Test code for C extension
    -    |
    -    +- mrbgem.rake      <- GEM specification
    -
    - -

    Ruby Extension

    - -

    mruby can be extended with pure Ruby. It is possible to override existing classes or add new ones in this way. Put all Ruby files into the mrblib directory.

    - -

    Pre-Conditions

    - -

    none

    - -

    Example

    - -
    +- ruby_extension_example/
    -    |
    -    +- README.md        (Optional)
    -    |
    -    +- mrblib/
    -    |   |
    -    |   +- example.rb   <- Ruby extension source
    -    |
    -    +- test/
    -    |   |
    -    |   +- example.rb   <- Test code for Ruby extension
    -    |
    -    +- mrbgem.rake      <- GEM specification
    -
    - -

    C and Ruby Extension

    - -

    mruby can be extended with C and Ruby at the same time. It is possible to override existing classes or add new ones in this way. Put all Ruby files into the mrblib directory and all C files into the src directory.

    - -

    mruby codes under mrblib directory would be executed after gem init C function is called. Make sure mruby script depends on C code and C code doesn’t depend on mruby script.

    - -

    Pre-Conditions

    - -

    See C and Ruby example.

    - -

    Example

    - -
    +- c_and_ruby_extension_example/
    -    |
    -    +- README.md        (Optional)
    -    |
    -    +- mrblib/
    -    |   |
    -    |   +- example.rb   <- Ruby extension source
    -    |
    -    +- src/
    -    |   |
    -    |   +- example.c    <- C extension source
    -    |
    -    +- test/
    -    |   |
    -    |   +- example.rb   <- Test code for C and Ruby extension
    -    |
    -    +- mrbgem.rake      <- GEM specification
    -
    - -

    Binary gems

    - -

    Some gems can generate executables under bin directory. Those gems are called binary gems. Names of binary gems are conventionally prefixed by mruby-bin, e.g. mruby-bin-mirb and mruby-bin-strip.

    - -

    To specify the name of executable, you need to specify spec.bins in the mrbgem.rake. The entry point main() should be in the C source file under tools/<bin>/*.c where <bin> is a name of the executable. C files under the <bin> directory are compiled and linked to the executable, but not included in libmruby.a, whereas files under mrblib and src are.

    - -

    It is strongly recommended not to include mrblib and src directories in the binary gems, to separate normal gems and binary gems.

    - -

    Example

    - -
    +- mruby-bin-example/
    -    |
    -    +- README.md          (Optional)
    -    |
    -    +- bintest/
    -    |   |
    -    |   +- example.rb     <- Test code for binary gem
    -    |
    -    +- mrbgem.rake        <- Gem specification
    -    |
    -    +- mrblib/            <- Source for Ruby extension (Optional)
    -    |
    -    +- src/               <- Source for C extension (Optional)
    -    |
    -    +- tools/
    -        |
    -        +- example/       <- Executable name directory
    -            |
    -            +- example.c  <- Source for Executable (includes main)
    -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mruby3.0.html b/docs/api/file.mruby3.0.html deleted file mode 100644 index 385a6a1..0000000 --- a/docs/api/file.mruby3.0.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - File: mruby3.0 - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    User visible changes in mruby3.0

    - -

    Build System

    - -

    build_config directory

    - -

    Typical build configuration files are located in build_config directory. For examples:

    -
    • -

      default: the default configuration

      -
    • -

      host-gprof: compiles with gprof for performance tuning

      -
    • -

      host-m32: compiles in gcc 32-bit mode on 64-bit platforms

      -
    • -

      boxing: compiles all three boxing options

      -
    • -

      clang-asan: compiles with clang‘s Address Sanitizer

      -
    - -

    You can specify the build configuration file with the MRUBY_CONFIG environment variable (or CONFIG in short). If the value specified by MRUBY_CONFIG is not the path to the configuration file, build_config/${MRUBY_CONFIG}.rb is used. So you can specify it as rake MRUBY_CONFIG=boxing, for example.

    - -

    Build Configuration Contribution

    - -

    When you write a new build configuration description, please contribute. We welcome your contribution as a GitHub pull-request.

    - -

    Language Changes

    - -

    New Syntax

    - -

    We have ported some new syntax from CRuby.

    -
    • -

      Single line pattern matching (12 => x); mruby matches only with local variables at the moment

      -
    • -

      Numbered block parameter (x.map{_1 * 2})

      -
    • -

      End-less def (def double(x) = x*2)

      -
    - -

    Configuration Options Changed

    - -

    Renamed for consistency

    - -

    Some configuration macro names are changed for consistency (use MRB_USE_XXX or MRB_NO_XXX).

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    mruby2mruby3
    ‘MRB_ENABLE_ALL_SYMBOLS`‘MRB_USE_ALL_SYMBOLS`
    ‘MRB_ENABLE_CXX_ABI`‘MRB_USE_CXX_ABI`
    ‘MRB_ENABLE_CXX_EXCEPTION`‘MRB_USE_CXX_EXCEPTION`
    ‘MRB_ENABLE_DEBUG_HOOK`‘MRB_USE_DEBUG_HOOK`
    ‘MRB_DISABLE_DIRECT_THREADING`‘MRB_NO_DIRECT_THREADING`
    ‘MRB_DISABLE_STDIO`‘MRB_NO_STDIO`
    ‘MRB_METHOD_T_STRUCT`‘MRB_USE_METHOD_T_STRUCT`
    ‘MRB_USE_FLOAT`‘MRB_USE_FLOAT32`
    ‘MRB_WITHOUT_FLOAT`‘MRB_NO_FLOAT`
    ‘ENABLE_LINENOISE`‘MRB_USE_LINENOISE`
    ‘ENABLE_READLINE`‘MRB_USE_READLINE`
    ‘DISABLE_MIRB_UNDERSCORE`‘MRB_NO_MIRB_UNDERSCORE`
    -
    • -

      MRB_USE_FLOAT32 is changed from MRB_USE_FLOAT to make sure float here means using single-precision float, and not the opposite of MRB_NO_FLOAT.

      -
    • -

      MRB_USE_METHOD_T_STRUCT uses struct version of mrb_method_t. More portable but consumes more memory. Turned on by default on 32-bit platforms.

      -
    • -

      MRB_ prefix is added to those without.

      -
    - -

    MRB_NO_BOXING

    - -

    Uses struct to represent mrb_value. Consumes more memory but easier to investigate the internal and to debug. It used to be default mrb_value representation. Now the default is MRB_WORD_BOXING.

    - -

    MRB_WORD_BOXING

    - -

    Pack mrb_value in an intptr_t integer. Consumes less memory compared to MRB_NO_BOXING especially on 32-bit platforms. Fixnum size is 31 bits so some integer values does not fit in Fixnum integers.

    - -

    MRB_NAN_BOXING

    - -

    Pack mrb_value in a floating-point number. Nothing changed from previous versions.

    - -

    MRB_USE_MALLOC_TRIM

    - -

    Call malloc_trim(0) from mrb_full_gc() if this macro is defined. If you are using glibc malloc, this macro could reduce memory consumption.

    - -

    Command Line Program

    - -

    bin/mruby (by mrbgems/mruby-bin-mruby)

    - -

    The mruby3 now automatically detects *.mrb files without the -b switch. Therefore, it can be mixed with the *.rb file in combination with the -r switch and specified at the same time. Here’s an example that works fine:

    - -
    $ bin/mruby app.mrb
    -$ bin/mruby -r lib1.mrb -r lib2.rb app.rb
    -$ bin/mruby -r lib1.rb -r lib2.rb < app.mrb
    -
    - -

    Internal Changes

    - -

    New Instructions

    - -

    mruby3 introduces a few new instructions.

    - -

    Instructions that access pool/syms where i>255.

    -
    • -

      OP_LOADL16

      -
    • -

      OP_STRING16

      -
    • -

      OP_LOADSYM16

      -
    - -

    Instructions that load a 32-bit integer.

    -
    • -

      OP_LOADI32

      -
    - -

    Instruction that unwinds jump table for rescue/ensure.

    -
    • -

      OP_JMPUW

      -
    - -

    Renamed from OP_RAISE

    -
    • -

      OP_RAISEIF

      -
    - -

    Instruction that is reserved for the future keyword argument support.

    -
    • -

      OP_SENDVK

      -
    - -

    Removed Instructions

    - -

    Instructions for old exception handling

    -
    • -

      OP_ONERR

      -
    • -

      OP_POPERR

      -
    • -

      OP_EPUSH

      -
    • -

      OP_EPOP

      -
    - -

    No more operand extension

    -
    • -

      OP_EXT1

      -
    • -

      OP_EXT2

      -
    • -

      OP_EXT3

      -
    - -

    Changed Instructions

    - -

    Jump addresses used to be specified by absolute offset from the start of iseq. Now they are relative offset from the address of the next instruction.

    - -

    Random now use xoshiro128++.

    - -

    For better and faster random number generation.

    - -

    Preallocated Symbol

    - -

    Preallocated symbols are interned at compile-time. They can be accessed via symbols macros (e.g. MRB_SYM()).

    - -

    See Symbols.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mruby3.1.html b/docs/api/file.mruby3.1.html deleted file mode 100644 index 182061f..0000000 --- a/docs/api/file.mruby3.1.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - File: mruby3.1 - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    User visible changes in mruby3.1 from mruby3.0

    - -

    New Features

    - -

    Core Language Features

    - -

    Keyword Arguments

    - -

    CRuby3.0 compatible keyword arguments are introduced. Keyword arguments are basically separated from ordinal arguments.

    - -

    Other Language Enhancement

    - - -

    Configuration Options Changed

    - -

    Some configuration macros are available:

    -
    • -

      MRB_WORDBOX_NO_FLOAT_TRUNCATE: by default, float values are packed in the word if possible, but define this macro to allocate float values in the heap.

      -
    • -

      MRB_USE_RO_DATA_P_ETEXT: define this macro if _etext is available on your platform.

      -
    • -

      MRB_NO_DEFAULT_RO_DATA_P: define this macro to avoid using predefined mrb_ro_data_p() function

      -
    -
    - -

    Updated Features

    - -

    New build configurations

    - -

    We have added several new build configurations in the build_config directory.

    -
    • -

      cross-mingw-winetest.rb

      -
    • -

      cross-mingw.rb

      -
    • -

      nintendo_switch.rb

      -
    • -

      serenity.rb

      -
    • -

      minimal: minimal configuration

      -
    • -

      host-f32: compiles with mrb_float as 32-bit float

      -
    • -

      host-nofloat: compiles with no float configuration

      -
    • -

      android_arm64_v8a.rb: renamed from android_arm64-v8a.rb

      -
    - -

    Core Libraries

    - -

    New Methods

    -
    • -

      Array#product

      -
    • -

      Array#repeated_combination

      -
    • -

      Array#repeated_permutation

      -
    • -

      Kernel#__ENCODING__

      -
    • -

      Random.bytes

      -
    • -

      Random#bytes

      -
    • -

      String#center

      -
    - -

    New Gem Enhancement

    -
    • -

      mrbgems/mruby-pack now supports M directive (Q encoding)

      -
    • -

      mrbgems/mruby-pack now supports X directive (back-up by bytes)

      -
    • -

      mrbgems/mruby-pack now supports @ directive (absolute position)

      -
    • -

      mrbgems/mruby-pack now supports w directive (BER compression)

      -
    - -

    Tools

    -
    • -

      mruby-config now supports --cc and --ld options.

      -
    • -

      Remove OP_ prefix from mruby -v code dump output.

      -
    • -

      Prohibit use of OP_EXT{1,2,3} by mrbc with --no-ext-ops option.

      -
    - -

    Features for mruby Developer

    -
    • -

      Add new specifier c to mrb_get_args() for receive Class/Module.

      -
    -
    - -

    Breaking Changes

    - -

    Incompatibly Changed Methods

    -
    • -

      Kernel#printf (mruby-sprintf) Format specifiers %a and %A are removed.

      -
    • -

      Kernel#puts (mruby-print) Now expand Array arguments.

      -
    - -

    mruby VM and bytecode

    - -

    Due to improvements in the binary format, mruby binaries are no longer backward compatible. To run the mruby binaries on mruby 3.1, recompile with the mruby 3.1 mrbc.

    -
    • -

      Upgrade mruby VM version RITE_VM_VER to 0300 (means mruby 3.0 or after).

      -
    • -

      Upgrade mruby binary version RITE_BINARY_FORMAT_VER to 0300.

      -
    - -

    Reintroduced Instructions

    - -

    mruby3.0 removed OP_EXT1, OP_EXT2, OP_EXT3 for operand extension. But the operand size limitations was too tight for real-world application. mruby3.1 reintroduces those extension instructions.

    - -

    Removed Instructions

    - -

    mruby3.1 removed following instructions.

    -
    • -

      OP_LOADL16

      -
    • -

      OP_LOADSYM16

      -
    • -

      OP_STRING16

      -
    • -

      OP_LAMBDA16

      -
    • -

      OP_BLOCK16

      -
    • -

      OP_METHOD16

      -
    • -

      OP_EXEC16

      -
    - -

    Those instructions are no longer needed by reintroduction of extension instructions.

    -
    • -

      OP_SENDV

      -
    • -

      OP_SENDVB

      -
    - -

    Those instructions for method calls with variable number of arguments are no longer needed. They are covered by OP_SEND instruction with n=15.

    - -

    New Instructions

    - -

    mruby3.1 introduces following new instructions.

    -
    • -

      OP_GETIDX: takes 1 operands R[a][a+1]

      -
    • -

      OP_SETIDX: takes 1 operands R[a][a+1]=R[a+2]

      -
    • -

      OP_SSEND: takes 3 operands a=self.b(c...); see OP_SEND

      -
    • -

      OP_SSENDB: takes 3 operands a=self.b(c...){...}; see OP_SEND

      -
    • -

      OP_SYMBOL: takes 2 operands R[a] = intern(Pool[b])

      -
    - -

    OP_GETIDX and OP_SETIDX

    - -

    Execute obj[int] and obj[int] = value respectively, where obj is string|array|hash.

    - -

    OP_SSEND and OP_SSENDB

    - -

    They are similar to OP_SEND and OP_SENDB respectively. They initialize the R[a] by self first so that we can skip one OP_LOADSELF instruction for each call.

    - -

    OP_SYMBOL

    - -

    Extracts the character string placed in the pool as a symbol.

    - -

    Changed Instructions

    - -

    OP_SEND and OP_SENDB

    - -

    Method calling instructions are unified. Now OP_SEND and OP_SENDB (method call with a block) can support both splat arguments and keyword arguments as well.

    - -

    The brief description of the instructions:

    - -

    |OP_SEND | BBB | R[a] = R[a].call(Syms[b],R[a+1..n],R[a+n+1],R[a+n+2]..nk) c=n|nk<<4 | |OP_SENDB | BBB | R[a] = R[a].call(Syms[b],R[a+1..n],R[a+n+1..nk],R[a+n+2..nk],&R[a+n+2*nk+2]) c=n|nk<<4 |

    - -

    Operand C specifies the number of arguments. Lower 4 bits (n) represents the number of ordinal arguments, and higher 4 bits (nk) represents the number of keyword arguments. When n == 15, the method takes arguments packed in an array. When nk == 15, the method takes keyword arguments are packed in a hash.

    - -

    OP_ARYPUSH

    - -

    Now takes 2 operands and pushes multiple entries to an array.

    - -

    Boxing Updated

    - -

    Word Boxing

    - -

    MRB_WORD_BOXING now packs floating-point numbers in the word, if the size of mrb_float is equal or smaller than the size of mrb_int by default. If the size of mrb_float and mrb_int are same, the last 2 bits in the mrb_float are trimmed and used as flags. If you need full precision, you need to define MRB_WORDBOX_NO_FLOAT_TRUNCATE as described above.

    - -

    NaN Boxing

    - -

    Previous NaN boxing packs values in NaN representation, but pointer retrievals are far more frequent than floating-point number references. So we add constant offset to NaN representation to clear higher bits of pointer representation. This representation is called “Favor Pointer” NaN Boxing.

    - -

    Also, previous NaN boxing limit the size of mrb_int to 4 bytes (32 bits) to fit in NaN values. Now we allocate integer values in the heap, if the value does not fit in the 32 bit range, just like we did in Word Boxing.

    - -

    Constant Folding

    - -

    The code generator was updated to reduce the number of instructions, e.g.

    - -
    a = 2 * 5
    -
    - -

    will be interpreted as

    - -
    a = 10
    -
    - -

    In addition, we have improved peephole optimizations, for example:

    - -
    GETIV R4 :@foo
    -MOVE R1 R4
    -
    - -

    to

    - -
    GETIV R1 :@foo
    -
    - -

    String#hash now use FNV1a algorithm

    - -

    For better and faster hash values.

    -
    - -

    Major bug fixes

    -
    • -

      Fix infinite recursive call bugs in integer division 98799aa6

      -
    • -

      Fix to raise TypeError with super inside instance_eval / class_eval #5476

      -
    • -

      Fix to call method_added hooks on method definitions; #2339

      -
    • -

      Fix a potential buffer overflow in time_zonename 26340a88

      -
    • -

      Fix Module.instance_eval bug #5528

      -
    • -

      Fix fix M packing bug bfe2bd49

      -
    • -

      Fix a bug regarding attribute assignment with kargs de2b4bd0

      -
    • -

      Fix SIGSEGV with mrbgems/mruby-method #5580

      -
    • -

      Fix print error before cleanup in codegen_error() #5603

      -
    • -

      Fix a bug in unpacking BER #5611

      -
    • -

      Fix a bug with numbered parameters as arguments #5605

      -
    • -

      Fix mrb_ary_shift_m initialization bug 27d1e013

      -
    • -

      Fix keyword argument with super #5628

      -
    • -

      Fix a bug with numbered parameters on toplevel 7e7f1b2f

      -
    • -

      Fix keyword argument bug #5632

      -
    • -

      Fix multiple assignments in parameters #5647

      -
    • -

      Fix keyword parameters not passing through super #5660

      -
    • -

      Fix infinite loop from unclosed here-doc #5676

      -
    • -

      Fix negative integer division bug #5678

      -
    - -

    CVEs

    - -

    Fixed CVEs

    - -

    Following CVEs are fixed in this release.

    - - -

    Unaffected CVEs

    - -

    Following CVEs do not cause problems in this release. They are fixed in the later release.

    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mruby3.2.html b/docs/api/file.mruby3.2.html deleted file mode 100644 index 8c8bbdb..0000000 --- a/docs/api/file.mruby3.2.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - File: mruby3.2 - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    User visible changes in mruby3.2 from mruby3.1

    - -

    The language

    -
    • -

      Now a::B = c should evaluate a then c.

      -
    • -

      Anonymous arguments *, **, & can be passed for forwarding.

      -
    • -

      Multi-precision integer is available now via mruby-bigint gem.

      -
    - -

    mruby VM and bytecode

    -
    • -

      OP_ARYDUP was renamed to OP_ARYSPLAT. The instruction name was changed but instruction number and basic behavior have not changed (except that ARYDUP nil makes []).

      -
    - -

    Tools

    - -

    mruby

    -
    • -

      -b only specifies the script is the binary. The files loaded by -r are not affected by the option.

      -
    • -

      mruby now loads complied binary if the suffix is .mrb.

      -
    - -

    mrbc

    -
    • -

      Add --no-optimize option to disable optimization.

      -
    - -

    mrbgems

    - -

    mruby-class-ext

    -
    • -

      Add Class#subclasses method.

      -
    • -

      Add Module#undefined_instance_methods method.

      -
    - -

    New bundled gems

    - - -

    Breaking Changes

    - -

    mrb_vm_run() may detach top-level local variables referenced from blocks

    - -

    When the mrb_vm_run() function (including mrb_top_run()) is called, the previous top-level local variables referenced from blocks is detached under either of the following conditions.

    -
    • -

      If the stack_keep parameter is given as 0.

      -
    • -

      If the number of variables in irep to be executed is less than the number of previous top-level local variables.

      -
    - -

    This change also affects API functions such as mrb_load_string() and mrb_load_file(). The conditions under which the previous top-level local variables referenced from blocks is detached in these functions are as follows:

    -
    • -

      If the function has no mrbc_context pointer parameter, or the mrbc_context pointer parameter is set to NULL.

      -
    • -

      If the number of variables held in the mrbc_context pointer is less than the number of previous top-level local variables.

      -
    - -

    Intentional reliance on previous behavior may cause compatibility problems in your application.

    - -

    CVEs

    - -

    Following CVEs are fixed.

    - -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mruby3.3.html b/docs/api/file.mruby3.3.html deleted file mode 100644 index 872c475..0000000 --- a/docs/api/file.mruby3.3.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - File: mruby3.3 - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    User visible changes in mruby3.3 from mruby3.2

    - -

    NOTE:” are changes to be aware of.

    - -

    The language

    - - -

    Configuration

    -
    • -

      mruby can be built using Docker now. Try docker-compose build for example. (#5961)

      -
    • -

      New Platform: DJGPP (MS-DOS) (#6022)

      -
    • -

      New Platform: Nintendo Wii (#6086)

      -
    • -

      Improved Platform: Android (#6013)

      -
    • -

      Improved Platform: Dreamcast (#6130)

      -
    • -

      Allow tests to be disabled for specific gems; warn about disabled tests (#6012)

      -
    • -

      Replace MRB_NO_DIRECT_THREADING with MRB_USE_VM_SWITCH_DISPATCH (#5902)

      -
    - -

    mruby memory API

    -
    • -

      mrb_default_allocf can be overridden by the application (34c5d96)

      -
    • -

      mrb_open_allocf will be deprecated (cfee5c2)

      -
    - -

    Changes in C API

    -
    • -

      add new error handling API functions (8c8bbd9)

      -
    • -

      Add mrb_vm_ci_env_clear() function with MRB_API (#5945)

      -
    • -

      a new function mrb_check_frozen_value() (ccdf75c)

      -
    • -

      avoid formatting in mrb_bug() (82a48bd)
      NOTE: If you are using it, you must give a simple string or replace it with a call to mrb_raise() series.

      -
    • -

      stop using mrbc_ prefix for compiler context (c5e3cbe)
      The same names are provided as before, but we recommend replacing them.

      -
    • -

      Allow Class#allocate to be prohibited (#5979, #6122, #6123)
      To disable #allocate, use MRB_UNDEF_ALLOCATOR(). This is also automatically applied when the subclass is created, but to explicitly allow it, use MRB_DEFINE_ALLOCATOR().

      -
    - -

    Changes in mrbgems

    -
    • -

      default.gembox: Add mruby debugger mrdb (mruby-bin-debugger) (#5966)

      -
    • -

      mruby-bin-config: new options --cxx, --cxxflags, --as, --asflags, --objc, --objcflags (#6054)

      -
    • -

      mruby-binding: renamed from mruby-binding-core of mruby3.2 (11af5db)
      NOTE: If using mruby-binding-core of mruby 3.2, replace it with mruby-binding.

      -
    • -

      mruby-binding: implemented Binding#initialize_copy method (#5517)

      -
    • -

      mruby-binding: Kernel#binding responds only to calls from Ruby (#5981)

      -
    • -

      mruby-compar-ext: Comparable#clamp to accept nil as arguments (836bebc)

      -
    • -

      mruby-compiler: add print name for identifier tokens (d7b2e3a)

      -
    • -

      mruby-data: allow empty Data (927a9df)

      -
    • -

      mruby-enumerator: remove internal attribute methods obj, args, kwd, meth, fib. (735fa24)

      -
    • -

      mruby-enumerator: add Enumerator#size (861f8bd)

      -
    • -

      mruby-eval: merged mruby-binding of mruby3.2 (501b22a, #5989)
      NOTE: If using mruby-binding of mruby 3.2, replace it with mruby-eval.

      -
    • -

      mruby-fiber: Add a new mrb_fiber_new() with MRB_API (#6097)

      -
    • -

      mruby-fiber: Allows calling Fiber#resume from C (#6106)

      -
    • -

      mruby-fiber: Fiber#to_s format changed (#6105)

      -
    • -

      mruby-io: add File#atime and File#ctime (321cfe9)

      -
    • -

      mruby-io: Add “x” mode option for IO.open (#6081)

      -
    • -

      mruby-io: File.new should not take blocks (53de964)

      -
    • -

      mruby-method: Method#to_s format changed (f5bc82f, 02f189c)

      -
    • -

      mruby-numeric-ext: int.pow(n,m) to take bigint as exponential (d482eab)

      -
    • -

      mruby-pack: support new directives j, J, b, B, # (2a1e3a5, e7021f1, e17f325)

      -
    • -

      mruby-range-ext: new method Range#overlap? (384d0e2)

      -
    • -

      mruby-string-ext: Add String#valid_encoding? method (eabe2d9)

      -
    • -

      mruby-struct: allow empty Struct when a name is not given (c212ede)

      -
    • -

      mruby-time: should allow year before 1900 (e5de08b)

      -
    • -

      mruby-time: support bigint to time_t if necessary (7096d27)

      -
    • -

      mruby-time: need to handle negative time_t (b064d7e)

      -
    - -

    Changes in build system

    -
    • -

      Extended rake install task (#5928)
      NOTE: Due to this impact, executable files in the mruby/bin/ directory by default are now symbolic links (batch files on Windows). If previously relied on those executables, should be replaced with direct references to the entity created under the build directory (e.g. mruby/build/host/bin/).

      -
    • -

      Encode and decode escape characters for presym (#6011)

      -
    • -

      Rakefile: remove default build target directories in deep_clean (#6032, 1e38569)

      -
    - -

    Other breaking changes

    -
    • -

      mrb_f_raise() is now an internal function (#5923, #6070)

      -
    • -

      mrb_make_exception() is now an internal function with different parameters (431f83e, 78137f3)

      -
    • -

      The File#path method no longer uses the #to_path method for implicit conversion (d86c4a7)

      -
    • -

      stop mrb isolation for each test file (a20fbe5)

      -
    • -

      RBreak remembers the CI location (#6103)

      -
    - -

    Bugs Fixed

    -
    • -

      #5724 Rational#** is missing

      -
    • -

      #5725 weird const_missing exceptions in mrblib code

      -
    • -

      #5789 No memory release of backtrace information due to stack error

      -
    • -

      #5932 How to create a block using the C API? mrb_yield keeps crashing!

      -
    • -

      #5943 TCPSocket#write is failed

      -
    • -

      #5944 Behavior of calling method with a hash variable

      -
    • -

      #5946 Don’t switch constant search path from modules to Object

      -
    • -

      #5949 Caller appears to report wrong line when block passed and brackets omitted

      -
    • -

      0906cd7 numeric.c: fix rounding function issues with big numbers

      -
    • -

      #5974 Invalid escape sequences in gem_init.c on windows

      -
    • -

      #5975 Equals comparison fails on extreme ends of 64-bit integers

      -
    • -

      #5985 Sign extension with OP_LOADI32 in get_int_operand()

      -
    • -

      #5986 Fix bugs in String#bytesplice

      -
    • -

      #5987 ~(-1 << 64) is incorrect

      -
    • -

      #5991 ‘gets’ method not working in mruby-3.2.0

      -
    • -

      #5994 fix typo in mrbgems/mruby-io/src/io.c

      -
    • -

      #5995 One seemingly unnecessary parameter is passed in the block parameters

      -
    • -

      #6008 Make “bintest” independent of directory

      -
    • -

      b47c8b7 gc.c (clear_all_old): fix a generational GC bug

      -
    • -

      #6029 mruby build fails under mrbgems directory

      -
    • -

      a264965 mruby-os-memsize/memsize.c: fix irep size calculation

      -
    • -

      3310e10 mruby-test/mrbgem.rake: fix mrb_state handling bug

      -
    • -

      #6041 GC Performance may have degraded

      -
    • -

      #6044 Generated presym/table.h contains invalid characters

      -
    • -

      #6051 Null pointer dereference in mrb_addrinfo_unix_path

      -
    • -

      #6052 Null pointer dereference while handling the Proc class

      -
    • -

      #6055 Fix libmruby name for VisualC++

      -
    • -

      #6060 SEGFAULT Issue Related to Fiber Usage in ngx_mruby Development

      -
    • -

      #6061 Performance issue in String#codepoints

      -
    • -

      #6064 MRUBY_PACKAGE_DIR does not always have a value.

      -
    • -

      #6065 Null pointer dereference while handling the Proc class

      -
    • -

      #6066 Null pointer dereference involving Struct.new()

      -
    • -

      #6067 Null pointer dereference in mrb_string_value_cstr

      -
    • -

      #6068 Stack overflow in mrb_vm_exec

      -
    • -

      #6076 Fixed unwinding block that could point to invalid PC

      -
    • -

      #6084 Incorrect symbolic sinks in binary built on Linux

      -
    • -

      #6087 ‘Remote branch HEAD not found in upstream origin’ error on build

      -
    • -

      #6089 binding.eval() handles def expressions differently from CRuby

      -
    • -

      #6098 Fails to call superclass of wrapped method

      -
    • -

      #6099 ensure section is not executed if the function exits via a return in a proc

      -
    • -

      #6108 VM crashes with break

      -
    • -

      #6118 Fixed IO#read with buf

      -
    • -

      #6120 Set EBADF if check_file_descriptor() fails

      -
    • -

      #6126 Fixed return value of OP_RETURN_BLK called directly under C function

      -
    • -

      #6134 String#unpack1 returns an array instead of a single string

      -
    • -

      #6136 Fixed when combined mrb_fiber_resume() and Fiber#transfer

      -
    - -

    Pull Requests (User Visible Ones)

    -
    • -

      #5517 Fixed local variables not separated between copied binding objects

      -
    • -

      #5902 Replace MRB_NO_DIRECT_THREADING with MRB_USE_VM_SWITCH_DISPATCH

      -
    • -

      #5923 Demotion mrb_f_raise() from MRB_API

      -
    • -

      #5928 Improved rake install

      -
    • -

      #5945 Avoid exposure for REnv objects

      -
    • -

      #5946 Don’t switch constant search path from modules to Object

      -
    • -

      #5966 Update default.gembox add mruby debugger mrdb

      -
    • -

      #5979 Allow Class#allocate to be prohibited

      -
    • -

      #5981 Kernel#binding responds only to calls from Ruby

      -
    • -

      #5989 Integrate mruby-binding-eval into mruby-eval

      -
    • -

      #5961 Add Docker to build and run all mruby tests. Run pre-commit and generate YARD docs with Docker

      -
    • -

      #5994 fix typo in mrbgems/mruby-io/src/io.c

      -
    • -

      #6008 Make “bintest” independent of directory

      -
    • -

      #6009 Avoid adding <MRUBY_ROOT>/bintest which does not exist

      -
    • -

      #6011 Encode and decode escape characters for presym

      -
    • -

      #6012 Allow tests to be disabled for specific gems; warn about disabled tests

      -
    • -

      #6013 Fix Android toolchain

      -
    • -

      #6022 Build configuration for MS-DOS and DJGPP

      -
    • -

      #6032 Rake: update task clean to remove bin and build folders

      -
    • -

      #6045 Fixes escape sequence bug and enhancements in Presym scanning

      -
    • -

      #6054 Extends bin/mruby-config

      -
    • -

      #6055 Fix libmruby name for VisualC++

      -
    • -

      #6070 Demotion mrb_f_raise() in kernel.c from MRB_API too

      -
    • -

      #6076 Fixed unwinding block that could point to invalid PC

      -
    • -

      #6081 Add “x” mode option for IO.open

      -
    • -

      #6086 Add build config for Nintendo Wii

      -
    • -

      #6097 Add a new mrb_fiber_new() with MRB_API

      -
    • -

      #6103 RBreak remembers the CI location

      -
    • -

      #6105 Implement Fiber#to_s method

      -
    • -

      #6106 Ease fiber limitations

      -
    • -

      #6118 Fixed IO#read with buf

      -
    • -

      #6120 Set EBADF if check_file_descriptor() fails

      -
    • -

      #6122 Prohibit Class#allocate in a different way

      -
    • -

      #6123 Inherit MRB_FL_UNDEF_ALLOCATE in subclasses

      -
    • -

      #6125 Allow OP_RETURN_BLK to cross C boundaries

      -
    • -

      #6126 Fixed return value of OP_RETURN_BLK called directly under C function

      -
    • -

      #6130 dreamcast_shelf build config: complete overhaul

      -
    • -

      #6136 Fixed when combined mrb_fiber_resume() and Fiber#transfer

      -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.mruby3.4.html b/docs/api/file.mruby3.4.html deleted file mode 100644 index 5c9e32d..0000000 --- a/docs/api/file.mruby3.4.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - - File: mruby3.4 - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    User visible changes in mruby3.4 from mruby3.3

    - -

    NOTE:” are changes to be aware of.

    - -

    The language

    -
    • -

      mruby now supports private and protected visibitily (b0db0bd)

      -
    • -

      Maximum length of inlined symbols reduced from 5 to 4 characters to provide space for visibility flags (6442a01)

      -
    • -

      Many methods are made private according to CRuby visibility (4a0e806)

      -
    • -

      Generate OP_SSEND for self.method type calls (111fe4b)

      -
    • -

      initialize method will be always private (eb8b412)

      -
    • -

      Add new hooks method_removed, method_undefined (9c74f6e)

      -
    • -

      Add new hooks singleton_method_removed, singleton_method_undefined (0863c08)

      -
    • -

      Updated OP_DEF output from codedump (3a3e877)

      -
    • -

      Better handling of binary strings, e.g. String#b (b0127f0)

      -
    • -

      Hash to_s format has changed (baeeb5e)

      -
    • -

      Some encoding related method such as #force_encoding (e47b4ca), #b (b0127f0)

      -
    • -

      Constant folding for String#+ (6687bdd)

      -
    • -

      Remove Float bit-operation (db8368f)

      -
    • -

      use SWAR technique for strlen performance (cbb31e6)

      -
    • -

      use merge sort for Array#sort (5bd63d6)

      -
    - -

    Changes in C API

    -
    • -

      pool.c renamed to mempool.c (and mrb_pool to mrb_mempool) (49525fa)

      -
    • -

      mrb_pool_value renamed to mrb_irep_pool to reduce confusion (62ef5db)

      -
    • -

      rename BOXNIX_SET_VALUE to BOXNO_SET_VALUE (#6397)

      -
    • -

      MRB_FROZEN_P() is replaced by mrb_frozen_p() (c11d18e)

      -
    • -

      rename color to gc_color (0e79f6b, 1e36d76)

      -
    • -

      add obj->frozen instead of flags MRB_SET_FROZEN_FLAG/MRB_UNSET_FROZEN_FLAG (8276143)

      -
    - -

    Build & Configuration

    -
    • -

      New Build Target: test:run:serial, test:run:serial:lib, test:run:serial:bin (#6423)

      -
    • -

      New Platform: Playstation Portable (#6022)

      -
    • -

      New Platform: emscripten (#6487)

      -
    • -

      New Config: no-float (with MRB_NO_FLOAT) (32200f1)

      -
    - -

    Changes in mrbgems

    -
    • -

      mruby-print: removed; if you do not use mruby-io, mruby use #print etc. in the core (8c8bbd9)

      -
    • -

      mruby-enum-lazy: Add Enumerable::Lazy#grep_v to mruby-enum-lazy (#6171)

      -
    • -

      mruby-io: Add level argument to File.dirname (#6463)

      -
    • -

      mruby-io: File.absolute_path? (#6482)

      -
    • -

      mruby-io: File.absolute_path (96113a2)

      -
    • -

      mruby-toplevel-ext: top-level public/private/protected moved to the core (2a876d2)

      -
    • -

      mruby-metaprog: method list methods now works according to the visibility (9229da1)

      -
    • -

      mruby-metaprog: public_instance_methods, private_instance_methods, protected_instance_methods (9e3e7b2)

      -
    • -

      mruby-encoding: MRB_UTF8_STRING turned on automatically with this gem (74bdae9)

      -
    - -

    Fixed GitHub Issues

    -
    • -

      #6173 Fails to build with tcc(Tiny C Compiler)

      -
    • -

      #6156 ‘/LIBPATH’ issue

      -
    • -

      #6183 “.e”.to_f returns NAN

      -
    • -

      #6182 mrb_read_float() converts “0.3” with a small error compared to strtod()

      -
    • -

      #6210 Unary minus seems broken

      -
    • -

      #6255 Wrong number of characters in broken UTF-8 string

      -
    • -

      #4038 Heap buffer overflow in OP_ENTER

      -
    • -

      #6262 Unable to define == for objects when using Array#delete

      -
    • -

      #6267 When MRB_UTF8_STRING is enabled, giving byte characters for String#index and String#split gives wrong results

      -
    • -

      #6277 MSVC: can’t use malloc() in string.c with WIN32_LEAN_AND_MEAN

      -
    • -

      #6240 Differentiate between lib and lib64 in the build settings.

      -
    • -

      #6304 Calling method_missing with only Kwargs passes arguments incorrectly

      -
    • -

      #6317 mrb_gc_register() may cause GC and collect the object being protected

      -
    • -

      #6307 Planned change patch for mrb_vm_exec()

      -
    • -

      #6298 foo :bar {} is legal in mruby?

      -
    • -

      #6326 Detect “Use-after-free” with address sanitizer

      -
    • -

      #5358 static warning from getpwnam

      -
    • -

      #6339 mrb_ary_delete() may refer to an invalid address (use-after-free)

      -
    • -

      #6346 Block kwargs are passed as last positional arg when using yield

      -
    • -

      #6365 powl() not available when compiling for Dreamcast

      -
    • -

      #6369 100x Performance Regression from 3.1

      -
    • -

      #6270 NODE_ZSUPER from deeply nested blocks will result in a truncated digits for block index in OP_ARGARY

      -
    • -

      #6297 Assigning to a block variable changes the actual block (thus affecting block_given? and yield)

      -
    • -

      #6389 instance_exec named block args don’t work properly

      -
    • -

      #6388 Recent commit broke my windows build

      -
    • -

      #6411 Wrong function unwinding when using return in a block

      -
    • -

      #6439 OP_JMPUW does not call the ensure block when it jumps to the beginning of the begin block

      -
    • -

      #6441 break inside while loop will execute the ensure block outside of the while loop

      -
    • -

      #6453 Bigint: incorrect behavior of ^ operator

      -
    • -

      #6452 Bigint: weird mod behavior

      -
    • -

      #6451 Bigint: incorrect division behavior

      -
    • -

      #6456 bigint: bug with division of a small number by a bigint

      -
    • -

      #6466 mruby-bin-mruby using Kernel#p and Kernel#print in bintest fails test

      -
    • -

      #6467 Heap-Use-After-Free due to Recursive group_by Calls

      -
    • -

      #6471 Discrepancy in codegen for binary operations between master branch and 3.3.0

      -
    • -

      #6477 heap-buffer-overflow in mrb_vm_exec

      -
    • -

      #6485 Hash#rehash does not check if the hash is frozen

      -
    • -

      #6483 Hash#default_proc= accepts arbitrary objects that are not callable

      -
    • -

      #6491 Destroy existing string literals when composing string literals

      -
    - -

    Merged Pull Requests (User Visible Ones)

    -
    • -

      #6171 Add Enumerable::Lazy#grep_v to mruby-enum-lazy

      -
    • -

      #6174 Fix MRUBY_PACKAGE_DIR in mruby-config.bat

      -
    • -

      #6175 Corrected strange conditional in mrb_vm_run()

      -
    • -

      #6176 Stop assuming alias proc in CI_PROC_SET()

      -
    • -

      #6177 gha: add macOS 14 to the build

      -
    • -

      #6184 Remove the L_STOP label

      -
    • -

      #6185 Added mrb_callinfo::u.keep_context for clarity

      -
    • -

      #6186 Omit NULL check of e->cxt in OP_RETURN_BLK

      -
    • -

      #6191 Speed up symbol equality comparison

      -
    • -

      #6192 Fix OP_STOP with exception

      -
    • -

      #6193 Fix wrong assertion in OP_SENDB.

      -
    • -

      #6194 Simplify the calculation of the number of closures in MRB_TT_FIBER

      -
    • -

      #6197 Fix int_xor to call flo_xor.

      -
    • -

      #6201 tasks/doc.rake: standardize the rake doc error messages

      -
    • -

      #6202 Remove the .yardoc folder with rake doc:clean:api

      -
    • -

      #6204 Clean up the .editorconfig file

      -
    • -

      #6209 Minor .gitignore clean up

      -
    • -

      #6211 Minor .gitignore clean up; order entries

      -
    • -

      #6216 Shared empty iv_tbl of module

      -
    • -

      #6217 Strict declaration for mrb_istruct_size()

      -
    • -

      #6219 Avoid assigning a fixed value in the loop

      -
    • -

      #6220 Reorganize mrb_cache_entry and mrb_method_t types

      -
    • -

      #6221 Arranging each_backtrace()

      -
    • -

      #6222 Need to synchronize dbg->regs after VM call in mrdb

      -
    • -

      #6224 mrb_env_unshare() to break the link to fiber

      -
    • -

      #6225 Revert “Adjust environment when mrb_exec_irep happened.”

      -
    • -

      #6227 fix: Array#shuffle(!) result distribution

      -
    • -

      #6228 Revert “env referred from top-level callinfo should not be unshared; fix #4019”

      -
    • -

      #6230 Fix status of fiber after switched by exception raised

      -
    • -

      #6231 Add a way to let other gems handle closing of fds in mruby-io

      -
    • -

      #6232 Fold the code for freeing env

      -
    • -

      #6233 Free stack memory at end of fiber

      -
    • -

      #6235 fix Array#delete always firing the block when deleting nil

      -
    • -

      #6236 unify the code for filter methods (and speed up #reject!)

      -
    • -

      #6237 Stricter env objects to attach to ci

      -
    • -

      #6238 Minimize zero initialization of the stack

      -
    • -

      #6243 Fixed base64 decoding in mruby-pack

      -
    • -

      #6244 Revise scope of role of mrb_vm_run()

      -
    • -

      #6246 Fix typo in test/t/hash.rb

      -
    • -

      #6249 Fix grammar in src/vm.c; catched -> caught

      -
    • -

      #6250 Fix spelling

      -
    • -

      #6251 Clean up root move CODEOWNERS to .github directory

      -
    • -

      #6253 Allow recycling fibers by GC if not referenced directly

      -
    • -

      #6256 Update documentation for mrb_top_run()

      -
    • -

      #6257 fix some mrbconf.md typos

      -
    • -

      #6260 Remove exc_caught from mrb_vm_exec()

      -
    • -

      #6261 fix: to_a integer ranges with begin > end failing

      -
    • -

      #6263 fix: Array#delete mistakenly calling block even if not passed

      -
    • -

      #6264 Must pass keyword arguments for Kernel#to_enum

      -
    • -

      #6265 Fixes Dir.children and Dir.each_child

      -
    • -

      #6266 Passes the nonexistent key as a block argument in Array#delete

      -
    • -

      #6273 Improvements to mrb_protect_atexit()

      -
    • -

      #6275 Fixed Binding#eval that failed to assign to the same variable

      -
    • -

      #6276 Always run atexit on the top-level call frame

      -
    • -

      #6279 Include headers for malloc() explicitly; fix #6277

      -
    • -

      #6280 Remove MRB_ENV_CLOSED flag

      -
    • -

      #6281 Fixes local variables in mruby-binding.

      -
    • -

      #6283 Simplify uvenv()

      -
    • -

      #6288 Detach env of ci explicitly on atexit

      -
    • -

      #6289 Simplify OP_RETURN_BLK and OP_BREAK

      -
    • -

      #6290 Allow to change the output directory name of the libmruby file

      -
    • -

      #6293 Changed the instruction table in opcode.md

      -
    • -

      #6294 Optimise mrb_iv_get

      -
    • -

      #6302 Minor cleanup in mrb_str_init

      -
    • -

      #6303 mrb_str_aset_m() should return replace instead of str

      -
    • -

      #6305 Protect keyword arguments in prepare_missing()

      -
    • -

      #6308 Assume that MRB_CATCH() has mrb->exc set

      -
    • -

      #6310 Doubling the call stack when extending it

      -
    • -

      #6311 Added fast-path for positional arguments less than 15 in OP_SEND

      -
    • -

      #6312 Omit error checking at OP_RETURN, OP_RETURN_BLK and OP_BREAK

      -
    • -

      #6313 Fix wrong column number in opcode.md

      -
    • -

      #6314 Optimize even?/odd? for big integers

      -
    • -

      #6318 Shrink variables in mrb_vm_exec()

      -
    • -

      #6320 Shrinking the code in OP_BREAK and OP_RETURN_BLK

      -
    • -

      #6321 Avoid warnings in lib/*/.rb

      -
    • -

      #6322 Fix mrb_ro_data_p on Intel Mac

      -
    • -

      #6324 Remove localjump_error()

      -
    • -

      #6327 fix ncurses linking issues

      -
    • -

      #6328 Fix use-after-free in obj_free() for env objects

      -
    • -

      #6329 Fix use-after-free in mrb_obj_alloc()

      -
    • -

      #6330 Add a precondition to call mrb_env_unshare().

      -
    • -

      #6331 Restore the GC arena with tests

      -
    • -

      #6332 Must not depend on the “host” build to generate mruby-compiler/core/y.tab.c

      -
    • -

      #6333 Reduce the number of branch instructions in the heap_p()

      -
    • -

      #6335 Add return_ci in CHECKPOINT_MAIN() of OP_RETURN

      -
    • -

      #6338 Need to place static proc objects into 8-byte alignments

      -
    • -

      #6340 Fix use-after-free for Array#<=>

      -
    • -

      #6341 Need to restore the GC arena after some function calls

      -
    • -

      #6344 prefer using mrb_yield to call block arguments

      -
    • -

      #6347 codegen.c,parse.y: remove flattening of yield arguments; fix #6346

      -
    • -

      #6348 Cancel the warning disablement

      -
    • -

      #6349 Perform GC before deleting directories

      -
    • -

      #6350 Fixed character encoding conversion function mismatch

      -
    • -

      #6351 Remove unnecessary mrb_gc_arena_restore()

      -
    • -

      #6353 Fix use-after-free in mrb_ary_delete()

      -
    • -

      #6356 Making splat argument objects invisible from Ruby side

      -
    • -

      #6373 Add build config for Milk-V Duo (RISC-V Linux) board

      -
    • -

      #6382 Make array objects invisible in mrb_gc_register()

      -
    • -

      #6385 Small improvements for mrb_gc_register()

      -
    • -

      #6386 Avoid calling mrb_gv_set() from mrb_gc_unregister()

      -
    • -

      #6387 Small improvements for mrb_gc_unregister()

      -
    • -

      #6390 Fix use-after-free by mrb_gc_unregistor()

      -
    • -

      #6391 Fixed argument forwarding in instance_exec

      -
    • -

      #6392 Fix argument forwarding in mrb_exec_irep()

      -
    • -

      #6393 Follow-up to #6391

      -
    • -

      #6395 Storing method-id inside Symbol#to_proc

      -
    • -

      #6396 Milk-V Build Config: update GPIO gem URL

      -
    • -

      #6397 boxing_no.h: rename BOXNIX_SET_VALUE -> BOXNO_SET_VALUE

      -
    • -

      #6399 Add macOS 15 to the build

      -
    • -

      #6405 io_read: use %i instead of %d in call to mrb_raisef

      -
    • -

      #6407 Allow to exclude specific files in rake install

      -
    • -

      #6408 Improve compliance with C++ standards

      -
    • -

      #6410 Put #include <stdlib.h> in parse.y

      -
    • -

      #6412 Distinguish the call frame of the generator with OP_RETURN_BLK

      -
    • -

      #6413 Add links to documentation in README.md

      -
    • -

      #6415 Fix numbered parameters when used as a singleton

      -
    • -

      #6416 Optimize the “new” method’s iseq

      -
    • -

      #6419 Follow Ruby’s behavior for numbered parameters in -> {}

      -
    • -

      #6420 Update labeler.yml: add label for the tools directory

      -
    • -

      #6422 Add annotations for function names defined in the preprocessor

      -
    • -

      #6423 Adding a serialized test task

      -
    • -

      #6427 Need to update ci variable after re-entry to VM

      -
    • -

      #6428 Change the limits of OP_ADDI and OP_SUBI from 0-127 to 0-255.

      -
    • -

      #6429 Fix numbered parameters when used as hash keys

      -
    • -

      #6432 Moving code in macro arguments out of macros

      -
    • -

      #6434 Added document “Layout of the mruby filesystem”

      -
    • -

      #6436 Make rake doc:update-index prettier friendly

      -
    • -

      #6437 Add more details to the pre-commit config

      -
    • -

      #6438 Remove unused MRuby::Build#list_install_excludes method

      -
    • -

      #6440 Fix redo keyword

      -
    • -

      #6442 Fixed wrong range condition in OP_JMPUW

      -
    • -

      #6443 Fix NODE_NEGATE for bigints

      -
    • -

      #6444 Add test cases for bigints

      -
    • -

      #6446 Omit the _WIN64 definition check

      -
    • -

      #6447 Fixed File.expand_path

      -
    • -

      #6448 Suppress presym in mruby/ext/io.h file

      -
    • -

      #6449 Using presym in the mruby-io/src/file_test.c file

      -
    • -

      #6450 Change MRB_WITH_IO_PREAD_PWRITE configuration name

      -
    • -

      #6454 mruby-bigint: handle rhs bigint in int_mod and int_divmod functions

      -
    • -

      #6455 mruby-bigint: fix rounding behavior in mpz_mdiv and mpz_mdivmod functions

      -
    • -

      #6457 bigint: fix bug with division of a small number by a bigint

      -
    • -

      #6459 FileTest is a module

      -
    • -

      #6461 To create a release package file in draft

      -
    • -

      #6462 Properly cast the return value of memchr()

      -
    • -

      #6463 Add level argument to File.dirname

      -
    • -

      #6465 Add initial playstation portable crossbuild support

      -
    • -

      #6468 Fixed missing changes to IB_FIND_BY_KEY() parameter names

      -
    • -

      #6469 Add more const qualifier for RProc

      -
    • -

      #6472 Moved tests for Integer#quo

      -
    • -

      #6473 Hide mpz_and() symbol

      -
    • -

      #6473 Hide mpz_and() symbol

      -
    • -

      #6474 Avoid array object creation with “unknown keyword” error

      -
    • -

      #6475 Don’t include deleted mruby-print

      -
    • -

      #6478 Fixed buffer overrun in function chars2bytes()

      -
    • -

      #6479 Reimplementation of File.expand_path method

      -
    • -

      #6482 Add File.absolute_path? method

      -
    • -

      #6487 Add Emscripten toolchain & build_config

      -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.opcode.html b/docs/api/file.opcode.html deleted file mode 100644 index 1d95e92..0000000 --- a/docs/api/file.opcode.html +++ /dev/null @@ -1,746 +0,0 @@ - - - - - - - File: opcode - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    The new bytecode

    - -

    We will reimplement the VM to use 8bit instruction code. By bytecode, we mean real byte code. The whole purpose is reducing the memory consumption of mruby VM.

    - -

    Instructions

    - -

    Instructions are bytes. There can be 256 instructions. Currently, we have 106 instructions. Instructions can take 0 to 3 operands.

    - -

    operands

    - -

    The size of operands can be either 8bits, 16bits or 24bits. In the table.1 below, the third field describes the size of operands.

    -
    • -

      B: 8bit

      -
    • -

      S: 16bit

      -
    • -

      W: 24bit

      -
    - -

    If the first and second operands are of type B (8bits), they may be extended to 16bits by the operand extension instruction immediately preceding them. See also OP_EXT1, OP_EXT2 and OP_EXT3.

    - -

    table.1 Instruction Table

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No.Instruction NameOperand typeSemantics
    0‘OP_NOP`‘-`‘no operation`
    1‘OP_MOVE`‘BB`‘R(a) = R(b)`
    2‘OP_LOADL`‘BB`‘R(a) = Pool(b)`
    3‘OP_LOADI8`‘BB`‘R(a) = mrb_int(b)`
    4‘OP_LOADINEG`‘BB`‘R(a) = mrb_int(-b)`
    5‘OP_LOADI__1`‘B`‘R(a) = mrb_int(-1)`
    6‘OP_LOADI_0`‘B`‘R(a) = mrb_int(0)`
    7‘OP_LOADI_1`‘B`‘R(a) = mrb_int(1)`
    8‘OP_LOADI_2`‘B`‘R(a) = mrb_int(2)`
    9‘OP_LOADI_3`‘B`‘R(a) = mrb_int(3)`
    10‘OP_LOADI_4`‘B`‘R(a) = mrb_int(4)`
    11‘OP_LOADI_5`‘B`‘R(a) = mrb_int(5)`
    12‘OP_LOADI_6`‘B`‘R(a) = mrb_int(6)`
    13‘OP_LOADI_7`‘B`‘R(a) = mrb_int(7)`
    14‘OP_LOADI16`‘BS`‘R(a) = mrb_int(b)`
    15‘OP_LOADI32`‘BSS`‘R(a) = mrb_int((b<<16)+c)`
    16‘OP_LOADSYM`‘BB`‘R(a) = Syms(b)`
    17‘OP_LOADNIL`‘B`‘R(a) = nil`
    18‘OP_LOADSELF`‘B`‘R(a) = self`
    19‘OP_LOADT`‘B`‘R(a) = true`
    20‘OP_LOADF`‘B`‘R(a) = false`
    21‘OP_GETGV`‘BB`‘R(a) = getglobal(Syms(b))`
    22‘OP_SETGV`‘BB`‘setglobal(Syms(b), R(a))`
    23‘OP_GETSV`‘BB`‘R(a) = Special`
    24‘OP_SETSV`‘BB`Special = R(a)`
    25‘OP_GETIV`‘BB`‘R(a) = ivget(Syms(b))`
    26‘OP_SETIV`‘BB`‘ivset(Syms(b),R(a))`
    27‘OP_GETCV`‘BB`‘R(a) = cvget(Syms(b))`
    28‘OP_SETCV`‘BB`‘cvset(Syms(b),R(a))`
    29‘OP_GETCONST`‘BB`‘R(a) = constget(Syms(b))`
    30‘OP_SETCONST`‘BB`‘constset(Syms(b),R(a))`
    31‘OP_GETMCNST`‘BB`‘R(a) = R(a)::Syms(b)`
    32‘OP_SETMCNST`‘BB`‘R(a+1)::Syms(b) = R(a)`
    33‘OP_GETUPVAR`‘BBB`‘R(a) = uvget(b,c)`
    34‘OP_SETUPVAR`‘BBB`‘uvset(b,c,R(a))`
    35‘OP_GETIDX`‘B`‘R(a) = R(a)`
    36‘OP_SETIDX`‘B`R(a) = R(a+2)`
    37‘OP_JMP`‘S`‘pc+=a`
    38‘OP_JMPIF`‘BS`‘if R(a) pc+=b`
    39‘OP_JMPNOT`‘BS`‘if !R(a) pc+=b`
    40‘OP_JMPNIL`‘BS`‘if R(a)==nil pc+=b`
    41‘OP_JMPUW`‘S`‘unwind_and_jump_to(a)`
    42‘OP_EXCEPT`‘B`‘R(a) = exc`
    43‘OP_RESCUE`‘BB`‘R(b) = R(a).isa?(R(b))`
    44‘OP_RAISEIF`‘B`‘raise(R(a)) if R(a)`
    45‘OP_SSEND`‘BBB`‘R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)`
    46‘OP_SSENDB`‘BBB`‘R(a) = self.send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))`
    47‘OP_SEND`‘BBB`‘R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..) (c=n|k<<4)`
    48‘OP_SENDB`‘BBB`‘R(a) = R(a).send(Syms(b),R(a+1)..,R(a+n+1):R(a+n+2)..,&R(a+n+2k+1))`
    49‘OP_CALL`‘-`‘self.call(*, **, &) (But overlay the current call frame; tailcall)`
    50‘OP_SUPER`‘BB`‘R(a) = super(R(a+1),… ,R(a+b+1))`
    51‘OP_ARGARY`‘BS`‘R(a) = argument array (16=m5:r1:m5:d1:lv4)`
    52‘OP_ENTER`‘W`‘arg setup according to flags (23=m5:o5:r1:m5:k5:d1:b1)`
    53‘OP_KEY_P`‘BB`‘R(a) = kdict.key?(Syms(b))`
    54‘OP_KEYEND`‘-`‘raise unless kdict.empty?`
    55‘OP_KARG`‘BB`‘R(a) = kdict; kdict.delete(Syms(b))`
    56‘OP_RETURN`‘B`‘return R(a) (normal)`
    57‘OP_RETURN_BLK`‘B`‘return R(a) (in-block return)`
    58‘OP_BREAK`‘B`‘break R(a)`
    59‘OP_BLKPUSH`‘BS`‘R(a) = block (16=m5:r1:m5:d1:lv4)`
    60‘OP_ADD`‘B`‘R(a) = R(a)+R(a+1)`
    61‘OP_ADDI`‘BB`‘R(a) = R(a)+mrb_int(b)`
    62‘OP_SUB`‘B`‘R(a) = R(a)-R(a+1)`
    63‘OP_SUBI`‘BB`‘R(a) = R(a)-mrb_int(b)`
    64‘OP_MUL`‘B`‘R(a) = R(a)*R(a+1)`
    65‘OP_DIV`‘B`‘R(a) = R(a)/R(a+1)`
    66‘OP_EQ`‘B`‘R(a) = R(a)==R(a+1)`
    67‘OP_LT`‘B`‘R(a) = R(a)<R(a+1)`
    68‘OP_LE`‘B`‘R(a) = R(a)<=R(a+1)`
    69‘OP_GT`‘B`‘R(a) = R(a)>R(a+1)`
    70‘OP_GE`‘B`‘R(a) = R(a)>=R(a+1)`
    71‘OP_ARRAY`‘BB`‘R(a) = ary_new(R(a),R(a+1)..R(a+b))`
    72‘OP_ARRAY2`‘BBB`‘R(a) = ary_new(R(b),R(b+1)..R(b+c))`
    73‘OP_ARYCAT`‘B`‘ary_cat(R(a),R(a+1))`
    74‘OP_ARYPUSH`‘BB`‘ary_push(R(a),R(a+1)..R(a+b))`
    75‘OP_ARYSPLAT`‘B`‘R(a) = ary_splat(R(a))`
    76‘OP_AREF`‘BBB`‘R(a) = R(b)`
    77‘OP_ASET`‘BBB`R(b) = R(a)`
    78‘OP_APOST`‘BBB`‘*R(a),R(a+1)..R(a+c) = R(a)`
    79‘OP_INTERN`‘B`‘R(a) = intern(R(a))`
    80‘OP_SYMBOL`‘BB`‘R(a) = intern(Pool(b))`
    81‘OP_STRING`‘BB`‘R(a) = str_dup(Pool(b))`
    82‘OP_STRCAT`‘B`‘str_cat(R(a),R(a+1))`
    83‘OP_HASH`‘BB`‘R(a) = hash_new(R(a),R(a+1)..R(a+b*2-1))`
    84‘OP_HASHADD`‘BB`‘hash_push(R(a),R(a+1)..R(a+b*2))`
    85‘OP_HASHCAT`‘B`‘R(a) = hash_cat(R(a),R(a+1))`
    86‘OP_LAMBDA`‘BB`‘R(a) = lambda(Irep(b),OP_L_LAMBDA)`
    87‘OP_BLOCK`‘BB`‘R(a) = lambda(Irep(b),OP_L_BLOCK)`
    88‘OP_METHOD`‘BB`‘R(a) = lambda(Irep(b),OP_L_METHOD)`
    89‘OP_RANGE_INC`‘B`‘R(a) = range_new(R(a),R(a+1),FALSE)`
    90‘OP_RANGE_EXC`‘B`‘R(a) = range_new(R(a),R(a+1),TRUE)`
    91‘OP_OCLASS`‘B`‘R(a) = ::Object`
    92‘OP_CLASS`‘BB`‘R(a) = newclass(R(a),Syms(b),R(a+1))`
    93‘OP_MODULE`‘BB`‘R(a) = newmodule(R(a),Syms(b))`
    94‘OP_EXEC`‘BB`‘R(a) = blockexec(R(a),Irep(b))`
    95‘OP_DEF`‘BB`‘R(a).newmethod(Syms(b),R(a+1)); R(a) = Syms(b)`
    96‘OP_ALIAS`‘BB`‘alias_method(target_class,Syms(a),Syms(b))`
    97‘OP_UNDEF`‘B`‘undef_method(target_class,Syms(a))`
    98‘OP_SCLASS`‘B`‘R(a) = R(a).singleton_class`
    99‘OP_TCLASS`‘B`‘R(a) = target_class`
    100‘OP_DEBUG`‘BBB`‘print a,b,c`
    101‘OP_ERR`‘B`‘raise(LocalJumpError, Pool(a))`
    102‘OP_EXT1`‘-`‘make 1st operand (a) 16bit`
    103‘OP_EXT2`‘-`‘make 2nd operand (b) 16bit`
    104‘OP_EXT3`‘-`‘make 1st and 2nd operands 16bit`
    105‘OP_STOP`‘-`‘stop VM`
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file.symbol.html b/docs/api/file.symbol.html deleted file mode 100644 index b0d7ddf..0000000 --- a/docs/api/file.symbol.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - File: symbol - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    Symbols

    - -

    Symbols in mruby C source code is represented by mrb_sym which is alias of uint32_t. Lower 30 bits are used for symbols so that higher 2 bits can be used as flags, e.g. struct mt_elem in class.c.

    - -
    struct mt_elem {
    -  union mt_ptr ptr;
    -  size_t func_p:1;
    -  size_t noarg_p:1;
    -  mrb_sym key:sizeof(mrb_sym)*8-2;
    -};
    -
    - -

    C API

    - -

    We provide following C API for symbols.

    - -

    Generate Symbols

    - -

    mrb_sym mrb_intern(mrb_state*,const char*,size_t)

    - -

    Get a symbol from a string.

    - -

    mrb_sym mrb_intern_check_cstr(mrb_state*,const char*)

    - -

    Get a symbol from a NULL terminated © string.

    - -

    mrb_sym mrb_intern_str(mrb_state*,mrb_value)

    - -

    Get a symbol from a Ruby string object.

    - -

    mrb_intern_lit(mrb_state*,const char*)

    - -

    Get a symbol from a C string literal. The second argument should be a C string literal, otherwise you will get a compilation error. It does not copy C string given the fact it’s a literal.

    - -

    mrb_sym mrb_intern_check(mrb_state*,const char*,size_t)

    - -

    Get a symbol from a string if the string has been already registered as a symbol, otherwise return 0. We also provide variants mrb_intern_check_str() (from Ruby string) and mrb_intern_check_cstr() (from C string).

    - -

    const char *mrb_sym_name(mrb_state*,mrb_sym)

    - -

    Get a string representation of a symbol as a C string.

    - -

    const char *mrb_sym_name_len(mrb_state*,mrb_sym,mrb_int*)

    - -

    Get a string representation of a symbol, and its length.

    - -

    Preallocate Symbols

    - -

    To save RAM, mruby can use compile-time allocation of some symbols. You can use following macros to get preallocated symbols by including mruby/presym.h header.

    -
    • -

      MRB_SYM(xor) //=> xor (Word characters)

      -
    • -

      MRB_SYM_B(xor) //=> xor! (Method with Bang)

      -
    • -

      MRB_SYM_Q(xor) //=> xor? (Method with Question mark)

      -
    • -

      MRB_SYM_E(xor) //=> xor= (Method with Equal)

      -
    • -

      MRB_GVSYM(xor) //=> $xor (Global Variable)

      -
    • -

      MRB_CVSYM(xor) //=> @@xor (Class Variable)

      -
    • -

      MRB_IVSYM(xor) //=> @xor (Instance Variable)

      -
    • -

      MRB_OPSYM(xor) //=> ^ (Operator)

      -
    - -

    For MRB_OPSYM(), specify the names corresponding to operators (see MRuby::Presym::OPERATORS in lib/mruby/presym.rb for the names that can be specified for it). Other than that, describe only word characters excluding leading and ending punctuations.

    - -

    These macros are converted to static symbol IDs at compile time, unless preallocate symbols are disabled by conf.disable_presym. In that case, these macros are expanded to mrb_intern_lit calls, therefore the mruby state variable is required. The above macros assume the variable name is mrb. If its name is not mrb, you need to use macros with _2 suffix, such as MRB_SYM_2 to specify mrb_state* variable.

    - -

    Disabling Preallocated Symbols

    - -

    You can disable preallocated symbols by specifying conf.disable_presym in the configuration file.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/file_list.html b/docs/api/file_list.html deleted file mode 100644 index 0076fe0..0000000 --- a/docs/api/file_list.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - File List - - - -
    -
    -

    File List

    - - - -
    - - -
    - - diff --git a/docs/api/frames.html b/docs/api/frames.html deleted file mode 100644 index 6586005..0000000 --- a/docs/api/frames.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - Documentation by YARD 0.9.37 - - - - diff --git a/docs/api/function_list.html b/docs/api/function_list.html deleted file mode 100644 index 3d8b1ad..0000000 --- a/docs/api/function_list.html +++ /dev/null @@ -1,2694 +0,0 @@ - - - - - - - - - - - - - - - - - - Functions List - - - -
    -
    -

    Functions List

    - - - -
    - - -
    - - diff --git a/docs/api/header_list.html b/docs/api/header_list.html deleted file mode 100644 index 9972889..0000000 --- a/docs/api/header_list.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - Headers List - - - -
    -
    -

    Headers List

    - - - -
    - - -
    - - diff --git a/docs/api/headers.html b/docs/api/headers.html deleted file mode 100644 index 5561b2a..0000000 --- a/docs/api/headers.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - Headersroot: headers - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/api/headers/mrbconf.h.html b/docs/api/headers/mrbconf.h.html deleted file mode 100644 index 7a1c2fa..0000000 --- a/docs/api/headers/mrbconf.h.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - Header: mrbconf.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mrbconf.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBYCONF_H - -
    -
    - -
    #define MRB_64BIT - -
    -
    - -
    #define MRB_32BIT - -
    -
    - -
    #define MRB_USE_FLOAT32 - -
    -
    - -
    #define MRB_NO_FLOAT - -
    -
    - -
    #define MRB_ENDIAN_BIG - -
    -
    - -
    #define MRB_WORD_BOXING - -
    -
    - -
    #define MRB_INT64 -
    -
    - -

    Use 64-bit integers on 64-bit architecture (without MRB_NAN_BOXING)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_INT32 -
    -
    - -

    Otherwise use 32-bit integers

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_USE_ETEXT_RO_DATA_P - -
    -
    - -
    #define MRB_NO_STDIO - -
    -
    - -
    #define MRB_USE_VM_SWITCH_DISPATCH - -
    -
    - -
    #define MRB_USE_DEBUG_HOOK - -
    -
    - -
    #define MRB_USE_ALL_SYMBOLS - -
    -
    - -
    #define MRB_USE_CXX_ABI - -
    -
    - -
    #define MRB_USE_CXX_EXCEPTION - -
    -
    - -
    #define MRB_NO_METHOD_CACHE - -
    -
    - -
    #define KHASH_DEFAULT_SIZE - -
    -
    - -
    #define MRB_HEAP_PAGE_SIZE - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby.h.html b/docs/api/headers/mruby.h.html deleted file mode 100644 index 5b4fafa..0000000 --- a/docs/api/headers/mruby.h.html +++ /dev/null @@ -1,9033 +0,0 @@ - - - - - - - Header: mruby.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby.h

    -

    Overview

    -
    -
    - -

    mruby C API entry point

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_H - -
    -
    - -
    #define __STDC_LIMIT_MACROS - -
    -
    - -
    #define __STDC_CONSTANT_MACROS - -
    -
    - -
    #define __STDC_FORMAT_MACROS - -
    -
    - -
    #define SIZE_MAX - -
    -
    - -
    #define __func__ - -
    -
    - -
    #define mrb_assert - -
    -
    - -
    #define mrb_assert_int_fit - -
    -
    - -
    #define mrb_static_assert -
    -
    - -

    The mrb_static_assert() macro function takes one or two arguments.

    - -
     mrb_static_assert(expect_condition);
    - mrb_static_assert(expect_condition, error_message);
    -
    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_static_assert1 - -
    -
    - -
    #define mrb_static_assert2 -
    -
    - -

    for old G+/Clang+

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define _mrb_static_assert_cat0 - -
    -
    - -
    #define _mrb_static_assert_cat - -
    -
    - -
    #define _mrb_static_assert_id - -
    -
    - -
    #define mrb_static_assert_expand - -
    -
    - -
    #define mrb_static_assert_selector - -
    -
    - -
    #define mrb_static_assert_powerof2 - -
    -
    - -
    #define FLT_EPSILON - -
    -
    - -
    #define DBL_EPSILON - -
    -
    - -
    #define LDBL_EPSILON - -
    -
    - -
    #define MRB_FLOAT_EPSILON - -
    -
    - -
    #define MRB_FIXED_STATE_ATEXIT_STACK_SIZE - -
    -
    - -
    #define MRB_METHOD_CACHE_SIZE -
    -
    - -

    cache size needs to be power of 2

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_exc_get - -
    -
    - -
    #define MRB_ARGS_REQ -
    -
    - -

    Function requires n arguments.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_OPT -
    -
    - -

    Function takes n optional arguments

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_ARG -
    -
    - -

    Function takes n1 mandatory arguments and n2 optional arguments

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_REST -
    -
    - -

    rest argument

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_POST -
    -
    - -

    required arguments after rest

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_KEY -
    -
    - -

    keyword arguments (n of keys, kdict)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_BLOCK -
    -
    - -

    Function takes a block argument

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_ANY -
    -
    - -

    Function accepts any number of arguments

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ARGS_NONE -
    -
    - -

    Function accepts no arguments

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_strlen_lit -
    -
    - -

    strlen for character string literals (use with caution or strlen instead) Adjacent string literals are concatenated in C/C++ in translation phase 6. If lit is not one, the compiler will report a syntax error: MSVC: “error C2143: syntax error : missing ‘)’ before ‘string’” GCC: “error: expected ‘)’ before string constant”

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_intern_lit - -
    -
    - -
    #define mrb_sym2name - -
    -
    - -
    #define mrb_sym2name_len - -
    -
    - -
    #define mrb_sym2str - -
    -
    - -
    #define MRB_OBJ_ALLOC -
    -
    - -

    Allocates a Ruby object that matches the constant literal defined in enum mrb_vtype and returns a pointer to the corresponding C type.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      Reference to the newly created object

      -
      - -
    • - -
    - -
    - - -
    -
    - -
    #define mrb_str_new_lit - -
    -
    - -
    #define mrb_str_new_frozen - -
    -
    - -
    #define mrb_str_new_cstr_frozen - -
    -
    - -
    #define mrb_str_new_static_frozen - -
    -
    - -
    #define mrb_str_new_lit_frozen - -
    -
    - -
    #define mrb_locale_free - -
    -
    - -
    #define mrb_utf8_free - -
    -
    - -
    #define mrb_utf8_from_locale - -
    -
    - -
    #define mrb_locale_from_utf8 - -
    -
    - -
    #define mrb_toplevel_run_keep -
    -
    - -

    compatibility macros

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_toplevel_run - -
    -
    - -
    #define mrb_context_run - -
    -
    - -
    #define mrb_as_float - -
    -
    - -
    #define mrb_to_float -
    -
    - -

    obsolete: use mrb_ensure_float_type() instead

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_gc_arena_save - -
    -
    - -
    #define mrb_gc_arena_restore - -
    -
    - -
    #define mrb_gc_mark_value - -
    -
    - -
    #define mrb_field_write_barrier_value - -
    -
    - -
    #define mrb_convert_type - -
    -
    - -
    #define mrb_check_convert_type - -
    -
    - -
    #define ISASCII - -
    -
    - -
    #define ISPRINT - -
    -
    - -
    #define ISSPACE - -
    -
    - -
    #define ISLOWER - -
    -
    - -
    #define ISALPHA - -
    -
    - -
    #define ISDIGIT - -
    -
    - -
    #define ISXDIGIT - -
    -
    - -
    #define ISALNUM - -
    -
    - -
    #define ISBLANK - -
    -
    - -
    #define TOUPPER - -
    -
    - -
    #define TOLOWER - -
    -
    - -
    #define MRB_ERROR_SYM -
    -
    - -

    macros to get typical exception objects note: + those E_* macros requires mrb_state* variable named mrb. + exception objects obtained from those macros are local to mrb

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define E_EXCEPTION - -
    -
    - -
    #define E_STANDARD_ERROR - -
    -
    - -
    #define E_RUNTIME_ERROR - -
    -
    - -
    #define E_TYPE_ERROR - -
    -
    - -
    #define E_ZERODIV_ERROR - -
    -
    - -
    #define E_ARGUMENT_ERROR - -
    -
    - -
    #define E_INDEX_ERROR - -
    -
    - -
    #define E_RANGE_ERROR - -
    -
    - -
    #define E_NAME_ERROR - -
    -
    - -
    #define E_NOMETHOD_ERROR - -
    -
    - -
    #define E_SCRIPT_ERROR - -
    -
    - -
    #define E_SYNTAX_ERROR - -
    -
    - -
    #define E_LOCALJUMP_ERROR - -
    -
    - -
    #define E_REGEXP_ERROR - -
    -
    - -
    #define E_FROZEN_ERROR - -
    -
    - -
    #define E_NOTIMP_ERROR - -
    -
    - -
    #define E_KEY_ERROR - -
    -
    - -
    #define E_FLOATDOMAIN_ERROR - -
    -
    - -
    #define mrb_string_type -
    -
    - -

    obsolete: use mrb_ensure_string_type() instead

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_to_str - -
    -
    - -
    #define mrb_str_to_str -
    -
    - -

    obsolete: use mrb_obj_as_string() instead

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_as_int - -
    -
    - -
    #define mrb_to_integer -
    -
    - -

    obsolete: use mrb_ensure_int_type() instead

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_to_int - -
    -
    - -
    #define mrb_int -
    -
    - -

    obsolete function(s); will be removed

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define E_FIBER_ERROR -
    -
    - -

    FiberError reference

    - -

    Implemented in mruby-fiber

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define memcpy - -
    -
    - -
    #define memset - -
    -
    - -
    #define mrb_int_hash_func - -
    -
    - -
    - - -

    Typedef Summary

    -
    - -
    typedef mrb_code -
    -
    - -

    mruby C API entry point

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    typedef mrb_aspec -
    -
    - -

    class mrb_aspec

    - -

    Specifies the number of arguments a function takes

    - -

    Example: MRB_ARGS_REQ(2) | MRB_ARGS_OPT(1) for a method that expects 2..3 arguments

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    typedef mrb_irep - -
    -
    - -
    typedef mrb_args_format -
    -
    - -

    Format specifiers for mrb_get_args function

    - -

    Must be a C string composed of the following format specifiers:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    charRuby typeC typesNotes
    ‘o`Objectmrb_valueCould be used to retrieve any type of argument
    ‘C`Class/Modulemrb_valuewhen ‘!` follows, the value may be `nil`
    ‘S`Stringmrb_valuewhen ‘!` follows, the value may be `nil`
    ‘A`Arraymrb_valuewhen ‘!` follows, the value may be `nil`
    ‘H`Hashmrb_valuewhen ‘!` follows, the value may be `nil`
    ‘s`Stringconst char *, mrb_intReceive two arguments; ‘s!` gives (`NULL`,`0`) for `nil`
    ‘z`Stringconst char *‘NULL` terminated string; `z!` gives `NULL` for `nil`
    ‘a`Arrayconst mrb_value *, mrb_intReceive two arguments; ‘a!` gives (`NULL`,`0`) for `nil`
    ‘c`Class/Modulestrcut RClass *‘c!` gives `NULL` for `nil`
    ‘f`Integer/Floatmrb_float
    ‘i`Integer/Floatmrb_int
    ‘b`booleanmrb_bool
    ‘n`String/Symbolmrb_sym
    ‘d`datavoid *, mruby.h.mrb_data_type const2nd argument will be used to check data type so it won’t be modified; when ‘!` follows, the value may be `nil`
    ‘I`inline structvoid *, struct RClass‘I!` gives `NULL` for `nil`
    ‘&`blockmrb_value&! raises exception if no block given.
    ‘*`rest argumentsconst mrb_value *, mrb_intReceive the rest of arguments as an array; ‘*!` avoid copy of the stack.
    |optionalAfter this spec following specs would be optional.
    ‘?`optional givenmrb_bool‘TRUE` if preceding argument is given. Used to check optional argument is given.
    ‘:`keyword argsmrb_kwargs constGet keyword arguments. @see mrb_kwargs
    - -

    Immediately after format specifiers it can add format modifiers:

    - - - - - - - - - - - - - - - - - - -
    charNotes
    ‘!`Switch to the alternate mode; The behaviour changes depending on the format specifier
    ‘+`Request a not frozen object; However, except nil value
    - - -
    -
    -
    - - -

    See Also:

    - - -
    - - -
    -
    - -
    typedef mrb_kwargs -
    -
    - -

    Get keyword arguments by mrb_get_args() with : specifier.

    - -

    mrb_kwargs::num indicates that the total number of keyword values.

    - -

    mrb_kwargs::required indicates that the specified number of keywords starting from the beginning of the mrb_sym array are required.

    - -

    mrb_kwargs::table accepts a mrb_sym array of C.

    - -

    mrb_kwargs::values is an object array of C, and the keyword argument corresponding to the mrb_sym array is assigned. Note that undef is assigned if there is no keyword argument corresponding over mrb_kwargs::required to mrb_kwargs::num.

    - -

    mrb_kwargs::rest is the remaining keyword argument that can be accepted as **rest in Ruby. If NULL is specified, ArgumentError is raised when there is an undefined keyword.

    - -

    Examples:

    - -
     // def method(a: 1, b: 2)
    -
    - mrb_int kw_num = 2;
    - mrb_int kw_required = 0;
    - mrb_sym kw_names[] = { mrb_intern_lit(mrb, "a"), mrb_intern_lit(mrb, "b") };
    - mrb_value kw_values[kw_num];
    - mrb_kwargs kwargs = { kw_num, kw_required, kw_names, kw_values, NULL };
    -
    - mrb_get_args(mrb, ":", &kwargs);
    - if (mrb_undef_p(kw_values[0])) { kw_values[0] = mrb_fixnum_value(1); }
    - if (mrb_undef_p(kw_values[1])) { kw_values[1] = mrb_fixnum_value(2); }
    -
    -
    - // def method(str, x:, y: 2, z: "default string", **opts)
    -
    - mrb_value str, kw_rest;
    - uint32_t kw_num = 3;
    - uint32_t kw_required = 1;
    - // Note that `#include <mruby/presym.h>` is required beforehand because `MRB_SYM()` is used.
    - // If the usage of `MRB_SYM()` is not desired, replace it with `mrb_intern_lit()`.
    - mrb_sym kw_names[] = { MRB_SYM(x), MRB_SYM(y), MRB_SYM(z) };
    - mrb_value kw_values[kw_num];
    - mrb_kwargs kwargs = { kw_num, kw_required, kw_names, kw_values, &kw_rest };
    -
    - mrb_get_args(mrb, "S:", &str, &kwargs);
    - // or: mrb_get_args(mrb, ":S", &kwargs, &str);
    - if (mrb_undef_p(kw_values[1])) { kw_values[1] = mrb_fixnum_value(2); }
    - if (mrb_undef_p(kw_values[2])) { kw_values[2] = mrb_str_new_cstr(mrb, "default string"); }
    -
    - - -
    -
    -
    - - -
    - - -
    -
    - -
    - -
    -

    Function Details

    - - -
    -

    - struct RClass * mrb_define_class(mrb_state * mrb, const char * name, struct RClass * super) - - -

    -
    -
    - -

    Defines a new class.

    - -

    If you’re creating a gem it may look something like this:

    - -
     void mrb_example_gem_init(mrb_state* mrb) {
    -     struct RClass *example_class;
    -     example_class = mrb_define_class(mrb, "Example_Class", mrb->object_class);
    - }
    -
    - void mrb_example_gem_final(mrb_state* mrb) {
    -     //free(TheAnimals);
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the defined class.

      -
      - -
    • - -
    • - - super - - - - - - - — -
      -

      The new class parent.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      Reference to the newly defined class.

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - struct RClass * mrb_define_class_id(mrb_state * mrb, mrb_sym name, struct RClass * super) - - -

    - -
    - - -
    -

    - struct RClass * mrb_define_module(mrb_state * mrb, const char * name) - - -

    -
    -
    - -

    Defines a new module.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the module.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      Reference to the newly defined module.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass * mrb_define_module_id(mrb_state * mrb, mrb_sym name) - - -

    - -
    - - -
    -

    - mrb_value mrb_singleton_class(mrb_state * mrb, mrb_value val) - - -

    -
    -
    - -

    Returns the singleton class of an object.

    - -

    Raises a TypeError exception for immediate values.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - struct RClass * mrb_singleton_class_ptr(mrb_state * mrb, mrb_value val) - - -

    -
    -
    - -

    Returns the singleton class of an object.

    - -

    Returns NULL for immediate values,

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_include_module(mrb_state * mrb, struct RClass * cla, struct RClass * included) - - -

    -
    -
    - -

    Include a module in another class or module. Equivalent to:

    - -

    module B include A end

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      A reference to module or a class.

      -
      - -
    • - -
    • - - included - - - - - - - — -
      -

      A reference to the module to be included.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_prepend_module(mrb_state * mrb, struct RClass * cla, struct RClass * prepended) - - -

    -
    -
    - -

    Prepends a module in another class or module.

    - -

    Equivalent to: module B prepend A end

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      A reference to module or a class.

      -
      - -
    • - -
    • - - prepended - - - - - - - — -
      -

      A reference to the module to be prepended.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_define_method(mrb_state * mrb, struct RClass * cla, const char * name, mrb_func_t func, mrb_aspec aspec) - - -

    -
    -
    - -

    Defines a global function in ruby.

    - -

    If you’re creating a gem it may look something like this

    - -

    Example:

    - -
    mrb_value example_method(mrb_state* mrb, mrb_value self)
    -{
    -     puts("Executing example command!");
    -     return self;
    -}
    -
    -void mrb_example_gem_init(mrb_state* mrb)
    -{
    -      mrb_define_method(mrb, mrb->kernel_module, "example_method", example_method, MRB_ARGS_NONE());
    -}
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      The class pointer where the method will be defined.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the method being defined.

      -
      - -
    • - -
    • - - func - - - - - - - — -
      -

      The function pointer to the method definition.

      -
      - -
    • - -
    • - - aspec - - - - - - - — -
      -

      The method parameters declaration.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_define_method_id(mrb_state * mrb, struct RClass * c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_private_method(mrb_state * mrb, struct RClass * cla, const char * name, mrb_func_t func, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_private_method_id(mrb_state * mrb, struct RClass * c, mrb_sym mid, mrb_func_t func, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_class_method(mrb_state * mrb, struct RClass * cla, const char * name, mrb_func_t fun, mrb_aspec aspec) - - -

    -
    -
    - -

    Defines a class method.

    - -

    Example:

    - -
    # Ruby style
    -class Foo
    -  def Foo.bar
    -  end
    -end
    -// C style
    -mrb_value bar_method(mrb_state* mrb, mrb_value self){
    -  return mrb_nil_value();
    -}
    -void mrb_example_gem_init(mrb_state* mrb){
    -  struct RClass *foo;
    -  foo = mrb_define_class(mrb, "Foo", mrb->object_class);
    -  mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
    -}
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      The class where the class method will be defined.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the class method being defined.

      -
      - -
    • - -
    • - - fun - - - - - - - — -
      -

      The function pointer to the class method definition.

      -
      - -
    • - -
    • - - aspec - - - - - - - — -
      -

      The method parameters declaration.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_define_class_method_id(mrb_state * mrb, struct RClass * cla, mrb_sym name, mrb_func_t fun, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_singleton_method(mrb_state * mrb, struct RObject * cla, const char * name, mrb_func_t fun, mrb_aspec aspec) - - -

    -
    -
    - -

    Defines a singleton method

    - - -
    -
    -
    - - -

    See Also:

    - - -
    - - -
    - - -
    -

    - void mrb_define_singleton_method_id(mrb_state * mrb, struct RObject * cla, mrb_sym name, mrb_func_t fun, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_module_function(mrb_state * mrb, struct RClass * cla, const char * name, mrb_func_t fun, mrb_aspec aspec) - - -

    -
    -
    - -

    Defines a module function.

    - -

    Example:

    - -
      # Ruby style
    -  module Foo
    -    def Foo.bar
    -    end
    -  end
    -  // C style
    -  mrb_value bar_method(mrb_state* mrb, mrb_value self){
    -    return mrb_nil_value();
    -  }
    -  void mrb_example_gem_init(mrb_state* mrb){
    -    struct RClass *foo;
    -    foo = mrb_define_module(mrb, "Foo");
    -    mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
    -  }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      The module where the module function will be defined.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the module function being defined.

      -
      - -
    • - -
    • - - fun - - - - - - - — -
      -

      The function pointer to the module function definition.

      -
      - -
    • - -
    • - - aspec - - - - - - - — -
      -

      The method parameters declaration.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_define_module_function_id(mrb_state * mrb, struct RClass * cla, mrb_sym name, mrb_func_t fun, mrb_aspec aspec) - - -

    - -
    - - -
    -

    - void mrb_define_const(mrb_state* mrb, struct RClass* cla, const char * name, mrb_value val) - - -

    -
    -
    - -

    Defines a constant.

    - -

    Example:

    - -
        # Ruby style
    -    class ExampleClass
    -      AGE = 22
    -    end
    -    // C style
    -    #include <stdio.h>
    -    #include <mruby.h>
    -
    -    void
    -    mrb_example_gem_init(mrb_state* mrb){
    -      mrb_define_const(mrb, mrb->kernel_module, "AGE", mrb_fixnum_value(22));
    -    }
    -
    -    mrb_value
    -    mrb_example_gem_final(mrb_state* mrb){
    -    }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      A class or module the constant is defined in.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the constant being defined.

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      The value for the constant.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_define_const_id(mrb_state* mrb, struct RClass* cla, mrb_sym name, mrb_value val) - - -

    - -
    - - -
    -

    - void mrb_undef_method(mrb_state * mrb, struct RClass * cla, const char * name) - - -

    -
    -
    - -

    Undefines a method.

    - -

    Example:

    - -
    # Ruby style
    -
    -class ExampleClassA
    -  def example_method
    -    "example"
    -  end
    -end
    -ExampleClassA.new.example_method # => example
    -
    -class ExampleClassB < ExampleClassA
    -  undef_method :example_method
    -end
    -
    -ExampleClassB.new.example_method # => undefined method 'example_method' for ExampleClassB (NoMethodError)
    -
    -// C style
    -#include <stdio.h>
    -#include <mruby.h>
    -
    -mrb_value
    -mrb_example_method(mrb_state *mrb){
    -  return mrb_str_new_lit(mrb, "example");
    -}
    -
    -void
    -mrb_example_gem_init(mrb_state* mrb){
    -  struct RClass *example_class_a;
    -  struct RClass *example_class_b;
    -  struct RClass *example_class_c;
    -
    -  example_class_a = mrb_define_class(mrb, "ExampleClassA", mrb->object_class);
    -  mrb_define_method(mrb, example_class_a, "example_method", mrb_example_method, MRB_ARGS_NONE());
    -  example_class_b = mrb_define_class(mrb, "ExampleClassB", example_class_a);
    -  example_class_c = mrb_define_class(mrb, "ExampleClassC", example_class_b);
    -  mrb_undef_method(mrb, example_class_c, "example_method");
    -}
    -
    -mrb_example_gem_final(mrb_state* mrb){
    -}
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cla - - - - - - - — -
      -

      The class the method will be undefined from.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the method to be undefined.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_undef_method_id(mrb_state* , struct RClass* , mrb_sym ) - - -

    - -
    - - -
    -

    - void mrb_undef_class_method(mrb_state * mrb, struct RClass * cls, const char * name) - - -

    -
    -
    - -

    Undefine a class method. Example:

    - -
     # Ruby style
    - class ExampleClass
    -   def self.example_method
    -     "example"
    -   end
    - end
    -
    -ExampleClass.example_method
    -
    -// C style
    -#include <stdio.h>
    -#include <mruby.h>
    -
    -mrb_value
    -mrb_example_method(mrb_state *mrb){
    -  return mrb_str_new_lit(mrb, "example");
    -}
    -
    -void
    -mrb_example_gem_init(mrb_state* mrb){
    -  struct RClass *example_class;
    -  example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
    -  mrb_define_class_method(mrb, example_class, "example_method", mrb_example_method, MRB_ARGS_NONE());
    -  mrb_undef_class_method(mrb, example_class, "example_method");
    - }
    -
    - void
    - mrb_example_gem_final(mrb_state* mrb){
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - cls - - - - - - - — -
      -

      A class the class method will be undefined from.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the class method to be undefined.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_undef_class_method_id(mrb_state * mrb, struct RClass * cls, mrb_sym name) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_new(mrb_state * mrb, struct RClass * c, mrb_int argc, const mrb_value * argv) - - -

    -
    -
    - -

    Initialize a new object instance of c class.

    - -

    Example:

    - -
    # Ruby style
    -class ExampleClass
    -end
    -
    -p ExampleClass # => #<ExampleClass:0x9958588>
    -// C style
    -#include <stdio.h>
    -#include <mruby.h>
    -
    -void
    -mrb_example_gem_init(mrb_state* mrb) {
    -  struct RClass *example_class;
    -  mrb_value obj;
    -  example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class); # => class ExampleClass; end
    -  obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new
    -  mrb_p(mrb, obj); // => Kernel#p
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - c - - - - - - - — -
      -

      Reference to the class of the new object.

      -
      - -
    • - -
    • - - argc - - - - - - - — -
      -

      Number of arguments in argv

      -
      - -
    • - -
    • - - argv - - - - - - - — -
      -

      Array of mrb_value to initialize the object

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      The newly initialized object

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_class_new_instance(mrb_state * mrb, mrb_int argc, const mrb_value * argv, struct RClass * c) - - -

    -
    -
    - - -
    -
    -
    - - -

    See Also:

    - - -
    - - -
    - - -
    -

    - struct RClass * mrb_class_new(mrb_state * mrb, struct RClass * super) - - -

    -
    -
    - -

    Creates a new instance of Class, Class.

    - -

    Example:

    - -
     void
    - mrb_example_gem_init(mrb_state* mrb) {
    -   struct RClass *example_class;
    -
    -   mrb_value obj;
    -   example_class = mrb_class_new(mrb, mrb->object_class);
    -   obj = mrb_obj_new(mrb, example_class, 0, NULL); // => #<#<Class:0x9a945b8>:0x9a94588>
    -   mrb_p(mrb, obj); // => Kernel#p
    -  }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - super - - - - - - - — -
      -

      The super class or parent.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      Reference to the new class.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass * mrb_module_new(mrb_state * mrb) - - -

    -
    -
    - -

    Creates a new module, Module.

    - -

    Example: void mrb_example_gem_init(mrb_state* mrb) { struct RClass *example_module;

    - -
       example_module = mrb_module_new(mrb);
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      Reference to the new module.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_class_defined(mrb_state * mrb, const char * name) - - -

    -
    -
    - -

    Returns an mrb_bool. True if class was defined, and false if the class was not defined.

    - -

    Example: void mrb_example_gem_init(mrb_state* mrb) { struct RClass *example_class; mrb_bool cd;

    - -
      example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
    -  cd = mrb_class_defined(mrb, "ExampleClass");
    -
    -  // If mrb_class_defined returns TRUE then puts "True"
    -  // If mrb_class_defined returns FALSE then puts "False"
    -  if (cd) {
    -    puts("True");
    -  }
    -  else {
    -    puts("False");
    -  }
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      A string representing the name of the class.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_bool) - - - - — -
      -

      A boolean value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_class_defined_id(mrb_state * mrb, mrb_sym name) - - -

    - -
    - - -
    -

    - struct RClass* mrb_class_get(mrb_state * mrb, const char * name) - - -

    -
    -
    - -

    Gets a class.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the class.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      A reference to the class.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass* mrb_class_get_id(mrb_state * mrb, mrb_sym name) - - -

    - -
    - - -
    -

    - struct RClass* mrb_exc_get_id(mrb_state * mrb, mrb_sym name) - - -

    -
    -
    - -

    Gets a exception class.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the class.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      A reference to the class.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_class_defined_under(mrb_state * mrb, struct RClass * outer, const char * name) - - -

    -
    -
    - -

    Returns an mrb_bool. True if inner class was defined, and false if the inner class was not defined.

    - -

    Example: void mrb_example_gem_init(mrb_state* mrb) { struct RClass example_outer, example_inner; mrb_bool cd;

    - -
      example_outer = mrb_define_module(mrb, "ExampleOuter");
    -
    -  example_inner = mrb_define_class_under(mrb, example_outer, "ExampleInner", mrb->object_class);
    -  cd = mrb_class_defined_under(mrb, example_outer, "ExampleInner");
    -
    -  // If mrb_class_defined_under returns TRUE then puts "True"
    -  // If mrb_class_defined_under returns FALSE then puts "False"
    -  if (cd) {
    -    puts("True");
    -  }
    -  else {
    -    puts("False");
    -  }
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - outer - - - - - - - — -
      -

      The name of the outer class.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      A string representing the name of the inner class.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_bool) - - - - — -
      -

      A boolean value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_class_defined_under_id(mrb_state * mrb, struct RClass * outer, mrb_sym name) - - -

    - -
    - - -
    -

    - struct RClass * mrb_class_get_under(mrb_state * mrb, struct RClass * outer, const char * name) - - -

    -
    -
    - -

    Gets a child class.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - outer - - - - - - - — -
      -

      The name of the parent class.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the class.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      A reference to the class.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass * mrb_class_get_under_id(mrb_state * mrb, struct RClass * outer, mrb_sym name) - - -

    - -
    - - -
    -

    - struct RClass * mrb_module_get(mrb_state * mrb, const char * name) - - -

    -
    -
    - -

    Gets a module.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the module.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      A reference to the module.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass * mrb_module_get_id(mrb_state * mrb, mrb_sym name) - - -

    - -
    - - -
    -

    - struct RClass * mrb_module_get_under(mrb_state * mrb, struct RClass * outer, const char * name) - - -

    -
    -
    - -

    Gets a module defined under another module.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - outer - - - - - - - — -
      -

      The name of the outer module.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the module.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      A reference to the module.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass * mrb_module_get_under_id(mrb_state * mrb, struct RClass * outer, mrb_sym name) - - -

    - -
    - - -
    -

    - void mrb_notimplement(mrb_state* ) - - -

    -
    -
    - -

    a function to raise NotImplementedError with current method name

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_notimplement_m(mrb_state* , mrb_value ) - - -

    -
    -
    - -

    a function to be replacement of unimplemented method

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_obj_itself(mrb_state* , mrb_value ) - - -

    -
    -
    - -

    just return it self

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_obj_dup(mrb_state * mrb, mrb_value obj) - - -

    -
    -
    - -

    Duplicate an object.

    - -

    Equivalent to: Object#dup

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - obj - - - - - - - — -
      -

      Object to be duplicate.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      The newly duplicated object.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_obj_respond_to(mrb_state * mrb, struct RClass* c, mrb_sym mid) - - -

    -
    -
    - -

    Returns true if obj responds to the given method. If the method was defined for that class it returns true, it returns false otherwise.

    - -
     Example:
    - # Ruby style
    - class ExampleClass
    -   def example_method
    -   end
    - end
    -
    - ExampleClass.new.respond_to?(:example_method) # => true
    -
    - // C style
    - void
    - mrb_example_gem_init(mrb_state* mrb) {
    -   struct RClass *example_class;
    -   mrb_sym mid;
    -   mrb_bool obj_resp;
    -
    -   example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
    -   mrb_define_method(mrb, example_class, "example_method", exampleMethod, MRB_ARGS_NONE());
    -   mid = mrb_intern_str(mrb, mrb_str_new_lit(mrb, "example_method" ));
    -   obj_resp = mrb_obj_respond_to(mrb, example_class, mid); // => TRUE (true in Ruby world)
    -
    -   // If mrb_obj_respond_to returns TRUE then puts "True"
    -   // If mrb_obj_respond_to returns FALSE then puts "False"
    -   if (obj_resp) {
    -     puts("True");
    -   }
    -   else {
    -     puts("False");
    -   }
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - c - - - - - - - — -
      -

      A reference to a class.

      -
      - -
    • - -
    • - - mid - - - - - - - — -
      -

      A symbol referencing a method id.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_bool) - - - - — -
      -

      A boolean value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - struct RClass* mrb_define_class_under(mrb_state * mrb, struct RClass * outer, const char * name, struct RClass * super) - - -

    -
    -
    - -

    Defines a new class under a given module

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - outer - - - - - - - — -
      -

      Reference to the module under which the new class will be defined

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the defined class

      -
      - -
    • - -
    • - - super - - - - - - - — -
      -

      The new class parent

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (struct RClass *) - - - - — -
      -

      Reference to the newly defined class

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - struct RClass* mrb_define_class_under_id(mrb_state * mrb, struct RClass * outer, mrb_sym name, struct RClass * super) - - -

    - -
    - - -
    -

    - struct RClass* mrb_define_module_under(mrb_state * mrb, struct RClass * outer, const char * name) - - -

    - -
    - - -
    -

    - struct RClass* mrb_define_module_under_id(mrb_state * mrb, struct RClass * outer, mrb_sym name) - - -

    - -
    - - -
    -

    - mrb_int mrb_get_args(mrb_state * mrb, mrb_args_format format, ... ) - - -

    -
    -
    - -

    Retrieve arguments from mrb_state.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - format - - - - - - - — -
      -

      is a list of format specifiers

      -
      - -
    • - -
    • - - ... - - - - - - - — -
      -

      The passing variadic arguments must be a pointer of retrieving type.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      the number of arguments retrieved.

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - mrb_int mrb_get_args_a(mrb_state * mrb, mrb_args_format format, void* , ptr ) - - -

    -
    -
    - -

    Array version of mrb_get_args()

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - ptr - - - - - - - — -
      -

      Array of void*, in the same order as the varargs version.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_sym mrb_get_mid(mrb_state * mrb) - - -

    -
    -
    - -

    get method symbol

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_int mrb_get_argc(mrb_state * mrb) - - -

    -
    -
    - -

    Retrieve number of arguments from mrb_state.

    - -

    Correctly handles *splat arguments.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_get_arg1(mrb_state * mrb) - - -

    -
    -
    - -

    Retrieve the first and only argument from mrb_state. Raises ArgumentError unless the number of arguments is exactly one.

    - -

    Correctly handles *splat arguments.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_bool mrb_block_given_p(mrb_state * mrb) - - -

    -
    -
    - -

    Check if a block argument is given from mrb_state.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_funcall(mrb_state * mrb, mrb_value val, const char * name, mrb_int argc, ... ) - - -

    -
    -
    - -

    Call existing ruby functions.

    - -

    Example:

    - -
     #include <stdio.h>
    - #include <mruby.h>
    - #include <mruby/compile.h>
    -
    - int
    - main()
    - {
    -   mrb_int i = 99;
    -   mrb_state *mrb = mrb_open();
    -
    -   if (!mrb) { }
    -   FILE *fp = fopen("test.rb","r");
    -   mrb_value obj = mrb_load_file(mrb,fp);
    -   mrb_funcall(mrb, obj, "method_name", 1, mrb_fixnum_value(i));
    -   mrb_funcall_id(mrb, obj, MRB_SYM(method_name), 1, mrb_fixnum_value(i));
    -   fclose(fp);
    -   mrb_close(mrb);
    - }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      A reference to an mruby value.

      -
      - -
    • - -
    • - - name - - - - - - - — -
      -

      The name of the method.

      -
      - -
    • - -
    • - - argc - - - - - - - — -
      -

      The number of arguments the method has.

      -
      - -
    • - -
    • - - ... - - - - - - - — -
      -

      Variadic values(not type safe!).

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      mruby function value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_funcall_id(mrb_state * mrb, mrb_value val, mrb_sym mid, mrb_int argc, ... ) - - -

    - -
    - - -
    -

    - mrb_value mrb_funcall_argv(mrb_state * mrb, mrb_value val, mrb_sym name, mrb_int argc, const mrb_value * argv) - - -

    -
    -
    - -

    Call existing ruby functions. This is basically the type safe version of mrb_funcall.

    - -
     #include <stdio.h>
    - #include <mruby.h>
    - #include <mruby/compile.h>
    - int
    - main()
    - {
    -   mrb_state *mrb = mrb_open();
    -   mrb_value obj = mrb_fixnum_value(1);
    -
    -   if (!mrb) { }
    -
    -   FILE *fp = fopen("test.rb","r");
    -   mrb_value obj = mrb_load_file(mrb,fp);
    -   mrb_funcall_argv(mrb, obj, MRB_SYM(method_name), 1, &obj); // Calling ruby function from test.rb.
    -   fclose(fp);
    -   mrb_close(mrb);
    -  }
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      A reference to an mruby value.

      -
      - -
    • - -
    • - - name_sym - - - - - - - — -
      -

      The symbol representing the method.

      -
      - -
    • - -
    • - - argc - - - - - - - — -
      -

      The number of arguments the method has.

      -
      - -
    • - -
    • - - obj - - - - - - - — -
      -

      Pointer to the object.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      mrb_value mruby function value.

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - mrb_value mrb_funcall_with_block(mrb_state * mrb, mrb_value val, mrb_sym name, mrb_int argc, const mrb_value * argv, mrb_value block) - - -

    -
    -
    - -

    Call existing ruby functions with a block.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_sym mrb_intern_cstr(mrb_state * mrb, const char* str) - - -

    -
    -
    - -

    Create a symbol from C string. But usually it’s better to use MRB_SYM, MRB_OPSYM, MRB_CVSYM, MRB_IVSYM, MRB_GVSYM, MRB_SYM_B, MRB_SYM_Q, MRB_SYM_E macros.

    - -

    Example:

    - -
    # Ruby style:
    -:pizza # => :pizza
    -
    -// C style:
    -mrb_sym sym1 = mrb_intern_lit(mrb, "pizza"); //  => :pizza
    -mrb_sym sym2 = MRB_SYM(pizza);               //  => :pizza
    -mrb_sym sym3 = MRB_SYM_Q(pizza);             //  => :pizza?
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      The string to be symbolized

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_sym) - - - - — -
      -

      mrb_sym A symbol.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_sym mrb_intern(mrb_state* , const char* , size_t ) - - -

    - -
    - - -
    -

    - mrb_sym mrb_intern_static(mrb_state* , const char* , size_t ) - - -

    - -
    - - -
    -

    - mrb_sym mrb_intern_str(mrb_state* , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_sym mrb_intern_check_cstr(mrb_state* , const char* ) - - -

    -
    -
    - -

    mrb_intern_check series functions returns 0 if the symbol is not defined

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_sym mrb_intern_check(mrb_state* , const char* , size_t ) - - -

    - -
    - - -
    -

    - mrb_sym mrb_intern_check_str(mrb_state* , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_value mrb_check_intern_cstr(mrb_state* , const char* ) - - -

    -
    -
    - -

    otherwise returns mrb_value

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_check_intern(mrb_state* , const char* , size_t ) - - -

    - -
    - - -
    -

    - mrb_value mrb_check_intern_str(mrb_state* , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_value mrb_sym_str(mrb_state* , mrb_sym ) - - -

    - -
    - - -
    -

    - void * mrb_malloc(mrb_state* , size_t ) - - -

    -
    -
    - -

    raise RuntimeError if no mem

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void * mrb_calloc(mrb_state* , size_t , size_t ) - - -

    -
    -
    - -

    ditto

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void * mrb_realloc(mrb_state* , void* , size_t ) - - -

    -
    -
    - -

    ditto

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void * mrb_realloc_simple(mrb_state* , void* , size_t ) - - -

    -
    -
    - -

    return NULL if no memory available

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void * mrb_malloc_simple(mrb_state* , size_t ) - - -

    -
    -
    - -

    return NULL if no memory available

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - struct RBasic * mrb_obj_alloc(mrb_state* , enum mrb_vtype, struct RClass* ) - - -

    -
    -
    - -

    return NULL if no memory available

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_free(mrb_state* , void* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_str_new(mrb_state * mrb, const char * p, mrb_int len) - - -

    - -
    - - -
    -

    - mrb_value mrb_str_new_cstr(mrb_state* , const char* ) - - -

    -
    -
    - -

    Turns a C string into a Ruby string value.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_str_new_static(mrb_state * mrb, const char * p, mrb_int len) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_freeze(mrb_state* , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_state* mrb_open(void) - - -

    -
    -
    - -

    Creates new mrb_state.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      Pointer to the newly created mrb_state.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_state* mrb_open_allocf(mrb_allocf f, void * ud) - - -

    -
    -
    - -

    Create new mrb_state with custom allocators.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - f - - - - - - - — -
      -

      Reference to the allocation function.

      -
      - -
    • - -
    • - - ud - - - - - - - — -
      -

      User data will be passed to custom allocator f. If user data isn’t required just pass NULL.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      Pointer to the newly created mrb_state.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_state* mrb_open_core(mrb_allocf f, void * ud) - - -

    -
    -
    - -

    Create new mrb_state with just the mruby core

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - f - - - - - - - — -
      -

      Reference to the allocation function. Use mrb_default_allocf for the default

      -
      - -
    • - -
    • - - ud - - - - - - - — -
      -

      User data will be passed to custom allocator f. If user data isn’t required just pass NULL.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      Pointer to the newly created mrb_state.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_close(mrb_state * mrb) - - -

    -
    -
    - -

    Closes and frees a mrb_state.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      Pointer to the mrb_state to be closed.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void* mrb_default_allocf(mrb_state* , void* , size_t , void* ) - - -

    -
    -
    - -

    The default allocation function.

    - - -
    -
    -
    - - -

    See Also:

    -
      - -
    • mruby.h.mrb_allocf
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_top_self(mrb_state * mrb) - - -

    - -
    - - -
    -

    - mrb_value mrb_top_run(mrb_state * mrb, const struct RProc * proc, mrb_value self, mrb_int stack_keep) - - -

    -
    -
    - -
    - Note: -
    -

    When called from a C function defined as a method, the current stack is destroyed. If you want to use arguments obtained by mrb_get_args() or other methods after mrb_top_run(), you must protect them by mrb_gc_protect() or other ways before this function. Or consider using mrb_yield() family functions.

    -
    -
    - - -

    Enter the mruby VM and execute the proc.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - proc - - - - - - - — -
      -

      An object containing irep. If supplied an object containing anything other than irep, it will probably crash.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      self on the execution context of proc.

      -
      - -
    • - -
    • - - stack_keep - - - - - - - — -
      -

      Specifies the number of values to hold from the stack top. Values on the stack outside this range will be initialized to nil.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_vm_run(mrb_state * mrb, const struct RProc * proc, mrb_value self, mrb_int stack_keep) - - -

    - -
    - - -
    -

    - mrb_value mrb_vm_exec(mrb_state * mrb, const struct RProc * proc, const mrb_code * iseq) - - -

    - -
    - - -
    -

    - void mrb_p(mrb_state* , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_int mrb_obj_id(mrb_value obj) - - -

    - -
    - - -
    -

    - mrb_sym mrb_obj_to_sym(mrb_state * mrb, mrb_value name) - - -

    - -
    - - -
    -

    - mrb_bool mrb_obj_eq(mrb_state * mrb, mrb_value a, mrb_value b) - - -

    - -
    - - -
    -

    - mrb_bool mrb_obj_equal(mrb_state * mrb, mrb_value a, mrb_value b) - - -

    - -
    - - -
    -

    - mrb_bool mrb_equal(mrb_state * mrb, mrb_value obj1, mrb_value obj2) - - -

    - -
    - - -
    -

    - mrb_value mrb_ensure_float_type(mrb_state * mrb, mrb_value val) - - -

    - -
    - - -
    -

    - mrb_value mrb_inspect(mrb_state * mrb, mrb_value obj) - - -

    - -
    - - -
    -

    - mrb_bool mrb_eql(mrb_state * mrb, mrb_value obj1, mrb_value obj2) - - -

    - -
    - - -
    -

    - mrb_int mrb_cmp(mrb_state * mrb, mrb_value obj1, mrb_value obj2) - - -

    -
    -
    - -

    mrb_cmp(mrb, obj1, obj2): 1:0:-1; -2 for error

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_garbage_collect(mrb_state* ) - - -

    - -
    - - -
    -

    - void mrb_full_gc(mrb_state* ) - - -

    - -
    - - -
    -

    - void mrb_incremental_gc(mrb_state* ) - - -

    - -
    - - -
    -

    - void mrb_gc_mark(mrb_state* , struct RBasic* ) - - -

    - -
    - - -
    -

    - void mrb_field_write_barrier(mrb_state* , struct RBasic* , struct RBasic* ) - - -

    - -
    - - -
    -

    - void mrb_write_barrier(mrb_state * , struct RBasic* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_type_convert(mrb_state * mrb, mrb_value val, enum mrb_vtype, type , mrb_sym method) - - -

    - -
    - - -
    -

    - mrb_value mrb_type_convert_check(mrb_state * mrb, mrb_value val, enum mrb_vtype, type , mrb_sym method) - - -

    - -
    - - -
    -

    - mrb_value mrb_any_to_s(mrb_state * mrb, mrb_value obj) - - -

    - -
    - - -
    -

    - struct RClass* mrb_obj_class(mrb_state * mrb, mrb_value obj) - - -

    - -
    - - -
    -

    - mrb_value mrb_class_path(mrb_state * mrb, struct RClass * c) - - -

    - -
    - - -
    -

    - mrb_bool mrb_obj_is_kind_of(mrb_state * mrb, mrb_value obj, struct RClass * c) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_inspect(mrb_state * mrb, mrb_value self) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_clone(mrb_state * mrb, mrb_value self) - - -

    - -
    - - -
    -

    - mrb_value mrb_exc_new(mrb_state * mrb, struct RClass * c, const char * ptr, mrb_int len) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_exc_raise(mrb_state * mrb, mrb_value exc) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_raise(mrb_state * mrb, struct RClass * c, const char * msg) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_raisef(mrb_state * mrb, struct RClass * c, const char * fmt, ... ) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_name_error(mrb_state * mrb, mrb_sym id, const char * fmt, ... ) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_frozen_error(mrb_state * mrb, void * frozen_obj) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_argnum_error(mrb_state * mrb, mrb_int argc, int min, int max) - - -

    - -
    - - -
    -

    - void mrb_warn(mrb_state * mrb, const char * fmt, ... ) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_bug(mrb_state * mrb, const char * mesg) - - -

    - -
    - - -
    -

    - void mrb_print_backtrace(mrb_state * mrb) - - -

    - -
    - - -
    -

    - void mrb_print_error(mrb_state * mrb) - - -

    - -
    - - -
    -

    - mrb_value mrb_vformat(mrb_state * mrb, const char * format, va_list ap) - - -

    -
    -
    - -

    function for raisef formatting

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_yield(mrb_state * mrb, mrb_value b, mrb_value arg) - - -

    - -
    - - -
    -

    - mrb_value mrb_yield_argv(mrb_state * mrb, mrb_value b, mrb_int argc, const mrb_value * argv) - - -

    - -
    - - -
    -

    - mrb_value mrb_yield_with_class(mrb_state * mrb, mrb_value b, mrb_int argc, const mrb_value * argv, mrb_value self, struct RClass * c) - - -

    - -
    - - -
    -

    - void mrb_gc_protect(mrb_state * mrb, mrb_value obj) - - -

    -
    -
    - -

    mrb_gc_protect() leaves the object in the arena

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_gc_register(mrb_state * mrb, mrb_value obj) - - -

    -
    -
    - -

    mrb_gc_register() keeps the object from GC.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_gc_unregister(mrb_state * mrb, mrb_value obj) - - -

    -
    -
    - -

    mrb_gc_unregister() removes the object from GC root.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ensure_array_type(mrb_state * mrb, mrb_value self) - - -

    -
    -
    - -

    type conversion/check functions

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_check_array_type(mrb_state * mrb, mrb_value self) - - -

    - -
    - - -
    -

    - mrb_value mrb_ensure_hash_type(mrb_state * mrb, mrb_value hash) - - -

    - -
    - - -
    -

    - mrb_value mrb_check_hash_type(mrb_state * mrb, mrb_value hash) - - -

    - -
    - - -
    -

    - mrb_value mrb_ensure_string_type(mrb_state * mrb, mrb_value str) - - -

    - -
    - - -
    -

    - mrb_value mrb_check_string_type(mrb_state * mrb, mrb_value str) - - -

    - -
    - - -
    -

    - mrb_value mrb_ensure_integer_type(mrb_state * mrb, mrb_value val) - - -

    -
    -
    - -

    check if val is an integer (including Bigint)

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ensure_int_type(mrb_state * mrb, mrb_value val) - - -

    -
    -
    - -

    check if val fit in mrb_int

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_check_type(mrb_state * mrb, mrb_value x, enum mrb_vtype, t ) - - -

    -
    -
    - -

    string type checking (contrary to the name, it doesn’t convert)

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_check_frozen(mrb_state * mrb, void * ) - - -

    - -
    - - -
    -

    - void mrb_check_frozen_value(mrb_state * mrb, mrb_value v) - - -

    - -
    - - -
    -

    - void mrb_define_alias(mrb_state * mrb, struct RClass * c, const char * a, const char * b) - - -

    - -
    - - -
    -

    - void mrb_define_alias_id(mrb_state * mrb, struct RClass * c, mrb_sym a, mrb_sym b) - - -

    - -
    - - -
    -

    - void mrb_define_global_const(mrb_state * mrb, const char * name, mrb_value val) - - -

    - -
    - - -
    -

    - mrb_value mrb_attr_get(mrb_state * mrb, mrb_value obj, mrb_sym id) - - -

    - -
    - - -
    -

    - mrb_bool mrb_respond_to(mrb_state * mrb, mrb_value obj, mrb_sym mid) - - -

    - -
    - - -
    -

    - mrb_bool mrb_obj_is_instance_of(mrb_state * mrb, mrb_value obj, const struct RClass* c) - - -

    - -
    - - -
    -

    - mrb_bool mrb_func_basic_p(mrb_state * mrb, mrb_value obj, mrb_sym mid, mrb_func_t func) - - -

    - -
    - - -
    -

    - mrb_value mrb_fiber_new(mrb_state * mrb, const struct RProc * proc) - - -

    -
    -
    - -

    Create a new Fiber from proc object

    - -

    Implemented in mruby-fiber

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_fiber_resume(mrb_state * mrb, mrb_value fib, mrb_int argc, const mrb_value * argv) - - -

    -
    -
    - -

    Resume a Fiber

    - -

    Implemented in mruby-fiber

    - -

    Switches to the specified fiber and executes. Like the Fiber#resume method.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_fiber_yield(mrb_state * mrb, mrb_int argc, const mrb_value * argv) - - -

    -
    -
    - -
    - Note: -
    -

    This function is only available from inside a function defined as a method by, for example, mrb_define_method(). Also, the work following mrb_fiber_yield() cannot be performed, and the return value of mrb_fiber_yield() must be returned as is.

    - -
    return mrb_fiber_yield(mrb, argc, argv);
    -
    -
    -
    - - -

    Yield a Fiber

    - -

    Implemented in mruby-fiber

    - -

    Passes control to the caller fiber of the running fiber. Like the Fiber.yield method.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_fiber_alive_p(mrb_state * mrb, mrb_value fib) - - -

    -
    -
    - -

    Check if a Fiber is alive

    - -

    Implemented in mruby-fiber

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_stack_extend(mrb_state* , mrb_int ) - - -

    - -
    - - -
    -

    - void* mrb_alloca(mrb_state * mrb, size_t ) - - -

    -
    -
    - -

    temporary memory allocation, only effective while GC arena is kept

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_state_atexit(mrb_state * mrb, mrb_atexit_func func) - - -

    - -
    - - -
    -

    - void mrb_show_version(mrb_state * mrb) - - -

    - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_format(mrb_state * mrb, const char * format, ... ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Farray.h.html b/docs/api/headers/mruby_2Farray.h.html deleted file mode 100644 index 7eff048..0000000 --- a/docs/api/headers/mruby_2Farray.h.html +++ /dev/null @@ -1,1934 +0,0 @@ - - - - - - - Header: mruby/array.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/array.h

    -

    Overview

    -
    -
    - -

    Array class

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_ARRAY_H - -
    -
    - -
    #define MRB_ARY_NO_EMBED - -
    -
    - -
    #define MRB_ARY_EMBED_LEN_MAX - -
    -
    - -
    #define mrb_ary_ptr - -
    -
    - -
    #define mrb_ary_value - -
    -
    - -
    #define RARRAY - -
    -
    - -
    #define ARY_EMBED_P - -
    -
    - -
    #define ARY_UNSET_EMBED_FLAG - -
    -
    - -
    #define ARY_EMBED_LEN - -
    -
    - -
    #define ARY_SET_EMBED_LEN - -
    -
    - -
    #define ARY_EMBED_PTR - -
    -
    - -
    #define MRB_ARY_EMBED_MASK - -
    -
    - -
    #define ARY_LEN - -
    -
    - -
    #define ARY_PTR - -
    -
    - -
    #define RARRAY_LEN - -
    -
    - -
    #define RARRAY_PTR - -
    -
    - -
    #define ARY_SET_LEN - -
    -
    - -
    #define ARY_CAPA - -
    -
    - -
    #define MRB_ARY_SHARED - -
    -
    - -
    #define ARY_SHARED_P - -
    -
    - -
    #define ARY_SET_SHARED_FLAG - -
    -
    - -
    #define ARY_UNSET_SHARED_FLAG - -
    -
    - -
    #define mrb_ary_ref - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - void mrb_ary_modify(mrb_state* , struct RArray* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_ary_new_capa(mrb_state* , mrb_int ) - - -

    - -
    - - -
    -

    - mrb_value mrb_ary_new(mrb_state * mrb) - - -

    -
    -
    - -

    Initializes a new array.

    - -

    Equivalent to:

    - -
     Array.new
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The initialized array.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_new_from_values(mrb_state * mrb, mrb_int size, const mrb_value * vals) - - -

    -
    -
    - -

    Initializes a new array with initial values

    - -

    Equivalent to:

    - -
     Array[value1, value2, ...]
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - size - - - - - - - — -
      -

      The number of values.

      -
      - -
    • - -
    • - - vals - - - - - - - — -
      -

      The actual values.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The initialized array.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_assoc_new(mrb_state * mrb, mrb_value car, mrb_value cdr) - - -

    -
    -
    - -

    Initializes a new array with two initial values

    - -

    Equivalent to:

    - -
     Array[car, cdr]
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - car - - - - - - - — -
      -

      The first value.

      -
      - -
    • - -
    • - - cdr - - - - - - - — -
      -

      The second value.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The initialized array.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_ary_concat(mrb_state * mrb, mrb_value self, mrb_value other) - - -

    -
    -
    - -

    Concatenate two arrays. The target array will be modified

    - -

    Equivalent to: ary.concat(other)

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - other - - - - - - - — -
      -

      The array that will be concatenated to self.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_splat(mrb_state * mrb, mrb_value value) - - -

    -
    -
    - -

    Create an array from the input. It tries calling to_a on the value. If value does not respond to that, it creates a new array with just this value.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - value - - - - - - - — -
      -

      The value to change into an array.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      An array representation of value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_ary_push(mrb_state * mrb, mrb_value array, mrb_value value) - - -

    -
    -
    - -

    Pushes value into array.

    - -

    Equivalent to:

    - -
     ary << value
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - ary - - - - - - - — -
      -

      The array in which the value will be pushed

      -
      - -
    • - -
    • - - value - - - - - - - — -
      -

      The value to be pushed into array

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_pop(mrb_state * mrb, mrb_value ary) - - -

    -
    -
    - -

    Pops the last element from the array.

    - -

    Equivalent to:

    - -
     ary.pop
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - ary - - - - - - - — -
      -

      The array from which the value will be popped.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The popped value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_ary_set(mrb_state * mrb, mrb_value ary, mrb_int n, mrb_value val) - - -

    -
    -
    - -

    Sets a value on an array at the given index

    - -

    Equivalent to:

    - -
     ary[n] = val
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - ary - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - n - - - - - - - — -
      -

      The array index being referenced.

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      The value being set.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_ary_replace(mrb_state * mrb, mrb_value self, mrb_value other) - - -

    -
    -
    - -

    Replace the array with another array

    - -

    Equivalent to:

    - -
     ary.replace(other)
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - other - - - - - - - — -
      -

      The array to replace it with.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_unshift(mrb_state * mrb, mrb_value self, mrb_value item) - - -

    -
    -
    - -

    Unshift an element into the array

    - -

    Equivalent to:

    - -
    ary.unshift(item)
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - item - - - - - - - — -
      -

      The item to unshift.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_entry(mrb_value ary, mrb_int offset) - - -

    -
    -
    - -

    Get nth element in the array

    - -

    Equivalent to:

    - -
    ary[offset]
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - ary - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - offset - - - - - - - — -
      -

      The element position (negative counts from the tail).

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_splice(mrb_state * mrb, mrb_value self, mrb_int head, mrb_int len, mrb_value rpl) - - -

    -
    -
    - -

    Replace subsequence of an array.

    - -

    Equivalent to:

    - -
     ary[head, len] = rpl
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The array from which the value will be partiality replaced.

      -
      - -
    • - -
    • - - head - - - - - - - — -
      -

      Beginning position of a replacement subsequence.

      -
      - -
    • - -
    • - - len - - - - - - - — -
      -

      Length of a replacement subsequence.

      -
      - -
    • - -
    • - - rpl - - - - - - - — -
      -

      The array of replacement elements. It is possible to pass mrb_undef_value() instead of an empty array.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The receiver array.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_shift(mrb_state * mrb, mrb_value self) - - -

    -
    -
    - -

    Shifts the first element from the array.

    - -

    Equivalent to:

    - -
     ary.shift
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The array from which the value will be shifted.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The shifted value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_clear(mrb_state * mrb, mrb_value self) - - -

    -
    -
    - -

    Removes all elements from the array

    - -

    Equivalent to:

    - -
     ary.clear
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      self

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_join(mrb_state * mrb, mrb_value ary, mrb_value sep) - - -

    -
    -
    - -

    Join the array elements together in a string

    - -

    Equivalent to:

    - -
     ary.join(sep="")
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - ary - - - - - - - — -
      -

      The target array

      -
      - -
    • - -
    • - - sep - - - - - - - — -
      -

      The separator, can be NULL

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ary_resize(mrb_state * mrb, mrb_value ary, mrb_int new_len) - - -

    -
    -
    - -

    Update the capacity of the array

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - ary - - - - - - - — -
      -

      The target array.

      -
      - -
    • - -
    • - - new_len - - - - - - - — -
      -

      The new capacity of the array

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fboxing_nan.h.html b/docs/api/headers/mruby_2Fboxing_nan.h.html deleted file mode 100644 index 6bd06af..0000000 --- a/docs/api/headers/mruby_2Fboxing_nan.h.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - Header: mruby/boxing_nan.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/boxing_nan.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_BOXING_NAN_H - -
    -
    - -
    #define mrb_nb_tt - -
    -
    - -
    #define NANBOX_SET_MISC_VALUE - -
    -
    - -
    #define NANBOX_SET_VALUE - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - enum mrb_type(mrb_value o) - - -

    - -
    - - -
    -

    - enum mrb_unboxed_type(mrb_value o) - - -

    - -
    - - -
    -

    - mrb_value mrb_boxing_int_value(struct mrb_state* , mrb_int ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fboxing_no.h.html b/docs/api/headers/mruby_2Fboxing_no.h.html deleted file mode 100644 index a62a983..0000000 --- a/docs/api/headers/mruby_2Fboxing_no.h.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - Header: mruby/boxing_no.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/boxing_no.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_BOXING_NO_H - -
    -
    - -
    #define MRB_FIXNUM_SHIFT - -
    -
    - -
    #define MRB_SYMBOL_SHIFT - -
    -
    - -
    #define MRB_FIXNUM_MIN - -
    -
    - -
    #define MRB_FIXNUM_MAX - -
    -
    - -
    #define mrb_ptr - -
    -
    - -
    #define mrb_cptr - -
    -
    - -
    #define mrb_float - -
    -
    - -
    #define mrb_fixnum -
    -
    - -

    #ifdef MRB_32BIT

    - -

    #define mrb_fixnum(o) ((mrb_int)((intptr_t)0xffffffffffff&((o).u))|(((o).u & 0x800000000000)?0xffff000000000000:0))

    - -

    #else

    - -

    #define mrb_fixnum(o) ((mrb_int)(int32_t)((o).u))

    - -

    #endif

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_integer - -
    -
    - -
    #define mrb_symbol - -
    -
    - -
    #define mrb_type - -
    -
    - -
    #define mrb_unboxed_type - -
    -
    - -
    #define BOXNO_SET_VALUE - -
    -
    - -
    #define SET_NIL_VALUE - -
    -
    - -
    #define SET_FALSE_VALUE - -
    -
    - -
    #define SET_TRUE_VALUE - -
    -
    - -
    #define SET_BOOL_VALUE - -
    -
    - -
    #define SET_INT_VALUE - -
    -
    - -
    #define SET_FIXNUM_VALUE - -
    -
    - -
    #define SET_FLOAT_VALUE - -
    -
    - -
    #define SET_SYM_VALUE - -
    -
    - -
    #define SET_OBJ_VALUE - -
    -
    - -
    #define SET_CPTR_VALUE - -
    -
    - -
    #define SET_UNDEF_VALUE - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fboxing_word.h.html b/docs/api/headers/mruby_2Fboxing_word.h.html deleted file mode 100644 index 9ae7e2b..0000000 --- a/docs/api/headers/mruby_2Fboxing_word.h.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - Header: mruby/boxing_word.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/boxing_word.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_BOXING_WORD_H - -
    -
    - -
    #define MRB_WORDBOX_NO_FLOAT_TRUNCATE - -
    -
    - -
    #define WORDBOX_FIXNUM_BIT_POS - -
    -
    - -
    #define WORDBOX_FIXNUM_SHIFT - -
    -
    - -
    #define WORDBOX_FIXNUM_FLAG - -
    -
    - -
    #define WORDBOX_FIXNUM_MASK - -
    -
    - -
    #define WORDBOX_SYMBOL_BIT_POS -
    -
    - -

    floats are allocated in heaps

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define WORDBOX_SYMBOL_SHIFT - -
    -
    - -
    #define WORDBOX_SYMBOL_FLAG - -
    -
    - -
    #define WORDBOX_SYMBOL_MASK - -
    -
    - -
    #define WORDBOX_FLOAT_FLAG - -
    -
    - -
    #define WORDBOX_FLOAT_MASK - -
    -
    - -
    #define WORDBOX_IMMEDIATE_MASK - -
    -
    - -
    #define WORDBOX_SET_SHIFT_VALUE - -
    -
    - -
    #define WORDBOX_SHIFT_VALUE_P - -
    -
    - -
    #define WORDBOX_OBJ_TYPE_P - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_word_boxing_cptr_value(struct mrb_state* , void* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_word_boxing_float_value(struct mrb_state* , mrb_float ) - - -

    - -
    - - -
    -

    - mrb_float mrb_word_boxing_value_float(mrb_value v) - - -

    - -
    - - -
    -

    - mrb_int mrb_integer_func(mrb_value o) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fclass.h.html b/docs/api/headers/mruby_2Fclass.h.html deleted file mode 100644 index ef62abf..0000000 --- a/docs/api/headers/mruby_2Fclass.h.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - Header: mruby/class.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/class.h

    -

    Overview

    -
    -
    - -

    Class class

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_CLASS_H - -
    -
    - -
    #define mrb_class_ptr - -
    -
    - -
    #define MRB_FL_CLASS_IS_PREPENDED -
    -
    - -

    flags: 20: frozen 19: is_prepended 18: is_origin 17: is_inherited (used by method cache) 7-16: unused 6: prohibit Class#allocate 0-5: instance type

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_FL_CLASS_IS_ORIGIN - -
    -
    - -
    #define MRB_CLASS_ORIGIN - -
    -
    - -
    #define MRB_FL_CLASS_IS_INHERITED - -
    -
    - -
    #define MRB_INSTANCE_TT_MASK - -
    -
    - -
    #define MRB_SET_INSTANCE_TT - -
    -
    - -
    #define MRB_INSTANCE_TT - -
    -
    - -
    #define MRB_FL_UNDEF_ALLOCATE - -
    -
    - -
    #define MRB_UNDEF_ALLOCATOR - -
    -
    - -
    #define MRB_UNDEF_ALLOCATOR_P - -
    -
    - -
    #define MRB_DEFINE_ALLOCATOR - -
    -
    - -
    #define mrb_mc_clear_by_class - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - struct RClass* mrb_class(mrb_state * mrb, mrb_value v) - - -

    - -
    - - -
    -

    - void mrb_define_method_raw(mrb_state* , struct RClass* , mrb_sym , mrb_method_t ) - - -

    - -
    - - -
    -

    - void mrb_alias_method(mrb_state* , struct RClass * c, mrb_sym a, mrb_sym b) - - -

    - -
    - - -
    -

    - void mrb_remove_method(mrb_state * mrb, struct RClass * c, mrb_sym sym) - - -

    - -
    - - -
    -

    - mrb_method_t mrb_method_search_vm(mrb_state* , struct RClass* , mrb_sym ) - - -

    - -
    - - -
    -

    - mrb_method_t mrb_method_search(mrb_state* , struct RClass* , mrb_sym ) - - -

    - -
    - - -
    -

    - struct RClass* mrb_class_real(struct RClass* cl) - - -

    - -
    - - -
    -

    - void mrb_mt_foreach(mrb_state* , struct RClass* , mrb_mt_foreach_func* , void* ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fcommon.h.html b/docs/api/headers/mruby_2Fcommon.h.html deleted file mode 100644 index 590ece3..0000000 --- a/docs/api/headers/mruby_2Fcommon.h.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - Header: mruby/common.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/common.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_COMMON_H - -
    -
    - -
    #define MRB_BEGIN_DECL -
    -
    - -

    Start declarations in C mode

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_END_DECL -
    -
    - -

    End declarations in C mode

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_noreturn - -
    -
    - -
    #define mrb_deprecated - -
    -
    - -
    #define mrb_alignas - -
    -
    - -
    #define inline - -
    -
    - -
    #define MRB_INLINE - -
    -
    - -
    #define MRB_API - -
    -
    - -
    #define MRB_MINGW64_VERSION - -
    -
    - -
    #define MRB_MINGW32_VERSION - -
    -
    - -
    #define MRB_MINGW32_LEGACY - -
    -
    - -
    - - -

    Typedef Summary

    -
    - -
    typedef ssize_t - -
    -
    - -
    - -
    -

    Function Details

    - - -
    -

    - __declspe c(dllimport ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fcompile.h.html b/docs/api/headers/mruby_2Fcompile.h.html deleted file mode 100644 index 981d98a..0000000 --- a/docs/api/headers/mruby_2Fcompile.h.html +++ /dev/null @@ -1,753 +0,0 @@ - - - - - - - Header: mruby/compile.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/compile.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_COMPILE_H - -
    -
    - -
    #define mrbc_context -
    -
    - -

    compatibility macros

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrbc_context_new - -
    -
    - -
    #define mrbc_context_free - -
    -
    - -
    #define mrbc_filename - -
    -
    - -
    #define mrbc_partial_hook - -
    -
    - -
    #define mrbc_cleanup_local_variables - -
    -
    - -
    #define STR_FUNC_PARSING - -
    -
    - -
    #define STR_FUNC_EXPAND - -
    -
    - -
    #define STR_FUNC_REGEXP - -
    -
    - -
    #define STR_FUNC_WORD - -
    -
    - -
    #define STR_FUNC_SYMBOL - -
    -
    - -
    #define STR_FUNC_ARRAY - -
    -
    - -
    #define STR_FUNC_HEREDOC - -
    -
    - -
    #define STR_FUNC_XQUOTE - -
    -
    - -
    #define MRB_PARSER_TOKBUF_MAX - -
    -
    - -
    #define MRB_PARSER_TOKBUF_SIZE - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_ccontext* mrb_ccontext_new(mrb_state * mrb) - - -

    -
    -
    - -

    compiler context

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_ccontext_free(mrb_state * mrb, mrb_ccontext * cxt) - - -

    - -
    - - -
    -

    - void mrb_ccontext_cleanup_local_variables(mrb_state * mrb, mrb_ccontext * c) - - -

    - -
    - - -
    -

    - struct mrb_parser_state* mrb_parser_new(mrb_state* ) - - -

    - -
    - - -
    -

    - void mrb_parser_free(struct mrb_parser_state* ) - - -

    - -
    - - -
    -

    - void mrb_parser_parse(struct mrb_parser_state* , mrb_ccontext* ) - - -

    - -
    - - -
    -

    - void mrb_parser_set_filename(struct mrb_parser_state* , char const) - - -

    - -
    - - -
    -

    - mrb_sym mrb_parser_get_filename(struct mrb_parser_state* , uint16_t idx) - - -

    - -
    - - -
    -

    - struct mrb_parser_state* mrb_parse_file(mrb_state* , FILE* , mrb_ccontext* ) - - -

    - -
    - - -
    -

    - struct mrb_parser_state* mrb_parse_string(mrb_state* , const char* , mrb_ccontext* ) - - -

    - -
    - - -
    -

    - struct mrb_parser_state* mrb_parse_nstring(mrb_state* , const char* , size_t , mrb_ccontext* ) - - -

    - -
    - - -
    -

    - struct RProc* mrb_generate_code(mrb_state* , struct mrb_parser_state* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_exec(mrb_state * mrb, struct mrb_parser_state * p, mrb_ccontext * c) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_file(mrb_state* , FILE* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_file_cxt(mrb_state* , FILE* , mrb_ccontext * cxt) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_detect_file_cxt(mrb_state * mrb, FILE * fp, mrb_ccontext * c) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_string(mrb_state * mrb, const char * s) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_nstring(mrb_state * mrb, const char * s, size_t len) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_string_cxt(mrb_state * mrb, const char * s, mrb_ccontext * cxt) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_nstring_cxt(mrb_state * mrb, const char * s, size_t len, mrb_ccontext * cxt) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fdata.h.html b/docs/api/headers/mruby_2Fdata.h.html deleted file mode 100644 index a9aa158..0000000 --- a/docs/api/headers/mruby_2Fdata.h.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - Header: mruby/data.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/data.h

    -

    Overview

    -
    -
    - -

    Custom data type description.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_DATA_H - -
    -
    - -
    #define Data_Wrap_Struct - -
    -
    - -
    #define Data_Make_Struct - -
    -
    - -
    #define RDATA - -
    -
    - -
    #define DATA_PTR - -
    -
    - -
    #define DATA_TYPE - -
    -
    - -
    #define DATA_GET_PTR - -
    -
    - -
    #define DATA_CHECK_GET_PTR - -
    -
    - -
    #define mrb_data_check_and_get -
    -
    - -

    obsolete functions and macros

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_get_datatype - -
    -
    - -
    #define mrb_check_datatype - -
    -
    - -
    #define Data_Get_Struct - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - struct RData * mrb_data_object_alloc(mrb_state * mrb, struct RClass* klass, void * datap, const mrb_data_type * type) - - -

    - -
    - - -
    -

    - void mrb_data_check_type(mrb_state * mrb, mrb_value , const mrb_data_type* ) - - -

    - -
    - - -
    -

    - void * mrb_data_get_ptr(mrb_state * mrb, mrb_value , const mrb_data_type* ) - - -

    - -
    - - -
    -

    - void * mrb_data_check_get_ptr(mrb_state * mrb, mrb_value , const mrb_data_type* ) - - -

    - -
    - - -
    -

    - void mrb_data_init(mrb_value v, void * ptr, const mrb_data_type * type) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fdebug.h.html b/docs/api/headers/mruby_2Fdebug.h.html deleted file mode 100644 index ac6f17b..0000000 --- a/docs/api/headers/mruby_2Fdebug.h.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - Header: mruby/debug.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/debug.h

    -

    Overview

    -
    -
    - -

    mruby Debugging.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_DEBUG_H - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - int32_t mrb_debug_get_line(mrb_state * mrb, const mrb_irep * irep, uint32_t pc) - - -

    -
    -
    - -

    get line from irep’s debug info and program counter

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      returns -1 if not found

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_debug_get_position(mrb_state * mrb, const mrb_irep * irep, uint32_t pc, int32_t * lp, const char * , fp ) - - -

    -
    -
    - -

    get line and filename from irep’s debug info and program counter

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      returns FALSE if not found

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_irep_debug_info * mrb_debug_info_alloc(mrb_state * mrb, mrb_irep * irep) - - -

    - -
    - - -
    -

    - mrb_irep_debug_info_file * mrb_debug_info_append_file(mrb_state * mrb, mrb_irep_debug_info * info, const char * filename, uint16_t * lines, uint32_t start_pos, uint32_t end_pos) - - -

    - -
    - - -
    -

    - void mrb_debug_info_free(mrb_state * mrb, mrb_irep_debug_info * d) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fdump.h.html b/docs/api/headers/mruby_2Fdump.h.html deleted file mode 100644 index 3360d30..0000000 --- a/docs/api/headers/mruby_2Fdump.h.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - Header: mruby/dump.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/dump.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_DUMP_H - -
    -
    - -
    #define MRB_DUMP_DEBUG_INFO -
    -
    - -

    flags for mrb_dump_irepmruby/dump.h.,_binary,_cfunc,_cstruct

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_DUMP_STATIC - -
    -
    - -
    #define MRB_DUMP_NO_LVAR - -
    -
    - -
    #define MRB_DUMP_OK -
    -
    - -

    dump/load error code

    - -

    NOTE: MRB_DUMP_GENERAL_FAILURE is caused by unspecified issues like malloc failed.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_DUMP_GENERAL_FAILURE - -
    -
    - -
    #define MRB_DUMP_WRITE_FAULT - -
    -
    - -
    #define MRB_DUMP_READ_FAULT - -
    -
    - -
    #define MRB_DUMP_INVALID_FILE_HEADER - -
    -
    - -
    #define MRB_DUMP_INVALID_IREP - -
    -
    - -
    #define MRB_DUMP_INVALID_ARGUMENT - -
    -
    - -
    #define MRB_DUMP_NULL_SYM_LEN -
    -
    - -

    null symbol length

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RITE_BINARY_IDENT -
    -
    - -

    Rite Binary File header

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RITE_BINARY_MAJOR_VER -
    -
    - -

    Minor: Upper-compatible to prior versions

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RITE_BINARY_MINOR_VER - -
    -
    - -
    #define RITE_BINARY_FORMAT_VER - -
    -
    - -
    #define RITE_COMPILER_NAME - -
    -
    - -
    #define RITE_COMPILER_VERSION - -
    -
    - -
    #define RITE_VM_VER - -
    -
    - -
    #define RITE_BINARY_EOF - -
    -
    - -
    #define RITE_SECTION_DEBUG_IDENT - -
    -
    - -
    #define MRB_DUMP_DEFAULT_STR_LEN - -
    -
    - -
    #define MRB_DUMP_ALIGNMENT - -
    -
    - -
    #define RITE_SECTION_HEADER -
    -
    - -

    section header

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RITE_LV_NULL_MARK - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_load_irep_file(mrb_state* , FILE* ) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_irep_file_cxt(mrb_state* , FILE* , mrb_ccontext* ) - - -

    - -
    - - -
    -

    - mrb_irep * mrb_read_irep(mrb_state* , const uint8_t* ) - - -

    -
    -
    - -

    avoid mrb_read_irep(); use mrb_read_irep_buf() instead (may cause buffer overflow)

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_irep * mrb_read_irep_buf(mrb_state* , const void* , size_t ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fendian.h.html b/docs/api/headers/mruby_2Fendian.h.html deleted file mode 100644 index a3f6986..0000000 --- a/docs/api/headers/mruby_2Fendian.h.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - Header: mruby/endian.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/endian.h

    -

    Overview

    -
    -
    - -

    can’t distinguish endian in compile time

    - - -
    -
    -
    - - -
    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_ENDIAN_H - -
    -
    - -
    #define BYTE_ORDER - -
    -
    - -
    #define BIG_ENDIAN - -
    -
    - -
    #define LITTLE_ENDIAN - -
    -
    - -
    #define littleendian - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Ferror.h.html b/docs/api/headers/mruby_2Ferror.h.html deleted file mode 100644 index f0d35ce..0000000 --- a/docs/api/headers/mruby_2Ferror.h.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - - - Header: mruby/error.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/error.h

    -

    Overview

    -
    -
    - -

    mruby error handling.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_ERROR_H - -
    -
    - -
    #define MRB_EXC_EXIT -
    -
    - -

    error that should terminate execution

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_EXC_EXIT_P - -
    -
    - -
    #define MRB_EXC_EXIT_STATUS -
    -
    - -

    retrieve status value from exc; need <mruby/variable.h> and <mruby/presym.h>

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_EXC_CHECK_EXIT -
    -
    - -

    exit with SystemExit status

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_exc_ptr - -
    -
    - -
    #define mrb_exc_new_lit - -
    -
    - -
    #define MRB_USE_RBREAK_VALUE_UNION - -
    -
    - -
    #define mrb_break_value_get - -
    -
    - -
    #define mrb_break_value_set - -
    -
    - -
    #define RBREAK_VALUE_TT_MASK - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_noreturn mrb_sys_fail(mrb_state * mrb, const char * mesg) - - -

    - -
    - - -
    -

    - mrb_value mrb_exc_new_str(mrb_state * mrb, struct RClass* c, mrb_value str) - - -

    - -
    - - -
    -

    - mrb_noreturn mrb_no_method_error(mrb_state * mrb, mrb_sym id, mrb_value args, const char * fmt, ... ) - - -

    - -
    - - -
    -

    - void mrb_clear_error(mrb_state * mrb) - - -

    -
    -
    - -

    clear error status in the mrb_state structure

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_bool mrb_check_error(mrb_state * mrb) - - -

    -
    -
    - -

    returns TRUE if error in the previous call; internally calls mrb_clear_error()

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_protect_error(mrb_state * mrb, mrb_protect_error_func * body, void * userdata, mrb_bool * error) - - -

    - -
    - - -
    -

    - mrb_value mrb_protect(mrb_state * mrb, mrb_func_t body, mrb_value data, mrb_bool * state) - - -

    -
    -
    - -

    Protect (takes mrb_value for body argument)

    - -

    Implemented in the mruby-error mrbgem

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_ensure(mrb_state * mrb, mrb_func_t body, mrb_value b_data, mrb_func_t ensure, mrb_value e_data) - - -

    -
    -
    - -

    Ensure

    - -

    Implemented in the mruby-error mrbgem

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_rescue(mrb_state * mrb, mrb_func_t body, mrb_value b_data, mrb_func_t rescue, mrb_value r_data) - - -

    -
    -
    - -

    Rescue

    - -

    Implemented in the mruby-error mrbgem

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_rescue_exceptions(mrb_state * mrb, mrb_func_t body, mrb_value b_data, mrb_func_t rescue, mrb_value r_data, mrb_int len, struct RClass * , classes ) - - -

    -
    -
    - -

    Rescue exception

    - -

    Implemented in the mruby-error mrbgem

    - - -
    -
    -
    - - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fext_2Fio.h.html b/docs/api/headers/mruby_2Fext_2Fio.h.html deleted file mode 100644 index 04750b3..0000000 --- a/docs/api/headers/mruby_2Fext_2Fio.h.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - Header: mruby/ext/io.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/ext/io.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_IO_H - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fgc.h.html b/docs/api/headers/mruby_2Fgc.h.html deleted file mode 100644 index ce774c7..0000000 --- a/docs/api/headers/mruby_2Fgc.h.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - Header: mruby/gc.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/gc.h

    -

    Overview

    -
    -
    - -

    Uncommon memory management stuffs.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_GC_H - -
    -
    - -
    #define MRB_EACH_OBJ_OK - -
    -
    - -
    #define MRB_EACH_OBJ_BREAK - -
    -
    - -
    #define MRB_GC_ARENA_SIZE - -
    -
    - -
    #define MRB_GC_RED - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - void mrb_free_context(struct mrb_state * mrb, struct mrb_context * c) - - -

    - -
    - - -
    -

    - mrb_bool mrb_object_dead_p(struct mrb_state * mrb, struct RBasic * object) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fhash.h.html b/docs/api/headers/mruby_2Fhash.h.html deleted file mode 100644 index d836811..0000000 --- a/docs/api/headers/mruby_2Fhash.h.html +++ /dev/null @@ -1,1655 +0,0 @@ - - - - - - - Header: mruby/hash.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/hash.h

    -

    Overview

    -
    -
    - -

    offset of iv must be 3 words

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_HASH_H - -
    -
    - -
    #define mrb_hash_ptr - -
    -
    - -
    #define mrb_hash_value - -
    -
    - -
    #define RHASH - -
    -
    - -
    #define MRB_HASH_IB_BIT_BIT - -
    -
    - -
    #define MRB_HASH_AR_EA_CAPA_BIT - -
    -
    - -
    #define MRB_HASH_IB_BIT_SHIFT - -
    -
    - -
    #define MRB_HASH_AR_EA_CAPA_SHIFT - -
    -
    - -
    #define MRB_HASH_AR_EA_N_USED_SHIFT - -
    -
    - -
    #define MRB_HASH_SIZE_FLAGS_SHIFT - -
    -
    - -
    #define MRB_HASH_IB_BIT_MASK - -
    -
    - -
    #define MRB_HASH_AR_EA_CAPA_MASK - -
    -
    - -
    #define MRB_HASH_AR_EA_N_USED_MASK - -
    -
    - -
    #define MRB_HASH_DEFAULT - -
    -
    - -
    #define MRB_HASH_PROC_DEFAULT - -
    -
    - -
    #define MRB_HASH_HT - -
    -
    - -
    #define MRB_RHASH_DEFAULT_P - -
    -
    - -
    #define MRB_RHASH_PROCDEFAULT_P - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_hash_new_capa(mrb_state * mrb, mrb_int capa) - - -

    - -
    - - -
    -

    - mrb_value mrb_hash_new(mrb_state * mrb) - - -

    -
    -
    - -

    Initializes a new hash.

    - -

    Equivalent to:

    - -
     Hash.new
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The initialized hash.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_hash_set(mrb_state * mrb, mrb_value hash, mrb_value key, mrb_value val) - - -

    -
    -
    - -

    Sets a keys and values to hashes.

    - -

    Equivalent to:

    - -
     hash[key] = val
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - key - - - - - - - — -
      -

      The key to set.

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      The value to set.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_get(mrb_state * mrb, mrb_value hash, mrb_value key) - - -

    -
    -
    - -

    Gets a value from a key. If the key is not found, the default of the hash is used.

    - -

    Equivalent to:

    - -
    hash[key]
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - key - - - - - - - — -
      -

      The key to get.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The found value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_fetch(mrb_state * mrb, mrb_value hash, mrb_value key, mrb_value def) - - -

    -
    -
    - -

    Gets a value from a key. If the key is not found, the default parameter is used.

    - -

    Equivalent to:

    - -
    hash.key?(key) ? hash[key] : def
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - key - - - - - - - — -
      -

      The key to get.

      -
      - -
    • - -
    • - - def - - - - - - - — -
      -

      The default value.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The found value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_delete_key(mrb_state * mrb, mrb_value hash, mrb_value key) - - -

    -
    -
    - -

    Deletes hash key and value pair.

    - -

    Equivalent to:

    - -
    hash.delete(key)
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - key - - - - - - - — -
      -

      The key to delete.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The deleted value. This value is not protected from GC. Use mrb_gc_protect() if necessary.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_keys(mrb_state * mrb, mrb_value hash) - - -

    -
    -
    - -

    Gets an array of keys.

    - -

    Equivalent to:

    - -
    hash.keys
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      An array with the keys of the hash.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_hash_key_p(mrb_state * mrb, mrb_value hash, mrb_value key) - - -

    -
    -
    - -

    Check if the hash has the key.

    - -

    Equivalent to:

    - -
    hash.key?(key)
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - key - - - - - - - — -
      -

      The key to check existence.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      True if the hash has the key

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_bool mrb_hash_empty_p(mrb_state * mrb, mrb_value self) - - -

    -
    -
    - -

    Check if the hash is empty

    - -

    Equivalent to:

    - -
    hash.empty?
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      True if the hash is empty, false otherwise.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_values(mrb_state * mrb, mrb_value hash) - - -

    -
    -
    - -

    Gets an array of values.

    - -

    Equivalent to:

    - -
    hash.values
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      An array with the values of the hash.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_clear(mrb_state * mrb, mrb_value hash) - - -

    -
    -
    - -

    Clears the hash.

    - -

    Equivalent to:

    - -
    hash.clear
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The hash

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_int mrb_hash_size(mrb_state * mrb, mrb_value hash) - - -

    -
    -
    - -

    Get hash size.

    - -

    Equivalent to:

    - -
     hash.size
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The hash size.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_hash_dup(mrb_state * mrb, mrb_value hash) - - -

    -
    -
    - -

    Copies the hash. This function does NOT copy the instance variables (except for the default value). Use mrb_obj_dup() to copy the instance variables as well.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The copy of the hash

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_hash_merge(mrb_state * mrb, mrb_value hash1, mrb_value hash2) - - -

    -
    -
    - -

    Merges two hashes. The first hash will be modified by the second hash.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference.

      -
      - -
    • - -
    • - - hash1 - - - - - - - — -
      -

      The target hash.

      -
      - -
    • - -
    • - - hash2 - - - - - - - — -
      -

      Updating hash

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_hash_foreach(mrb_state * mrb, struct RHash * hash, mrb_hash_foreach_func * func, void * p) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Finternal.h.html b/docs/api/headers/mruby_2Finternal.h.html deleted file mode 100644 index ce15166..0000000 --- a/docs/api/headers/mruby_2Finternal.h.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - Header: mruby/internal.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/internal.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_INTERNAL_H - -
    -
    - -
    #define mrb_bint_new_int64 - -
    -
    - -
    #define mrb_bint_as_int64 - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Firep.h.html b/docs/api/headers/mruby_2Firep.h.html deleted file mode 100644 index 5b37b67..0000000 --- a/docs/api/headers/mruby_2Firep.h.html +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - Header: mruby/irep.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/irep.h

    -

    Overview

    -
    -
    - -

    Compiled mruby scripts.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_IREP_H - -
    -
    - -
    #define IREP_TT_NFLAG - -
    -
    - -
    #define IREP_TT_SFLAG - -
    -
    - -
    #define MRB_ISEQ_NO_FREE - -
    -
    - -
    #define MRB_IREP_NO_FREE - -
    -
    - -
    #define MRB_IREP_STATIC - -
    -
    - -
    #define mrb_irep_catch_handler_pack - -
    -
    - -
    #define mrb_irep_catch_handler_unpack - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_irep * mrb_add_irep(mrb_state * mrb) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_irep(mrb_state * , const uint8_t * ) - - -

    -
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - irep - - - (const uint8_t*) - - - - — -
      -

      code, expected as a literal

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_load_irep_buf(mrb_state * , const void * , size_t ) - - -

    -
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - irep - - - (const void*) - - - - — -
      -

      code

      -
      - -
    • - -
    • - - size - - - (size_t) - - - - — -
      -

      of irep buffer.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_load_irep_cxt(mrb_state * , const uint8_t * , mrbc_context * ) - - -

    -
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - irep - - - (const uint8_t*) - - - - — -
      -

      code, expected as a literal

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_load_irep_buf_cxt(mrb_state * , const void * , size_t , mrbc_context * ) - - -

    -
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - irep - - - (const void*) - - - - — -
      -

      code

      -
      - -
    • - -
    • - - size - - - (size_t) - - - - — -
      -

      of irep buffer.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fistruct.h.html b/docs/api/headers/mruby_2Fistruct.h.html deleted file mode 100644 index dbc2754..0000000 --- a/docs/api/headers/mruby_2Fistruct.h.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - Header: mruby/istruct.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/istruct.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_ISTRUCT_H - -
    -
    - -
    #define ISTRUCT_DATA_SIZE -
    -
    - -

    Inline structures that fit in RVALUE

    - -

    They cannot have finalizer, and cannot have instance variables.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RISTRUCT - -
    -
    - -
    #define ISTRUCT_PTR - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_int mrb_istruct_size(void) - - -

    - -
    - - -
    -

    - void* mrb_istruct_ptr(mrb_value object) - - -

    - -
    - - -
    -

    - void mrb_istruct_copy(mrb_value dest, mrb_value src) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fkhash.h.html b/docs/api/headers/mruby_2Fkhash.h.html deleted file mode 100644 index bcf30d3..0000000 --- a/docs/api/headers/mruby_2Fkhash.h.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - Header: mruby/khash.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/khash.h

    -

    Overview

    -
    -
    - -

    khash definitions used in mruby’s hash table.

    - - -
    -
    -
    - - -
    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_KHASH_H - -
    -
    - -
    #define KHASH_MIN_SIZE - -
    -
    - -
    #define UPPER_BOUND - -
    -
    - -
    #define __ac_isempty - -
    -
    - -
    #define __ac_isdel - -
    -
    - -
    #define __ac_iseither - -
    -
    - -
    #define khash_power2 - -
    -
    - -
    #define khash_mask - -
    -
    - -
    #define khash_upper_bound - -
    -
    - -
    #define KHASH_DECLARE -
    -
    - -

    declare struct kh_xxx and kh_xxx_funcs

    - -

    name: hash name khkey_t: key data type khval_t: value data type kh_is_map: (0: hash set / 1: hash map)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define KHASH_DEFINE -
    -
    - -

    define kh_xxx_funcs

    - -

    name: hash name khkey_t: key data type khval_t: value data type kh_is_map: (0: hash set / 1: hash map) hash_func: hash function hash_equal: hash comparison function

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define khash_t - -
    -
    - -
    #define kh_init_size - -
    -
    - -
    #define kh_init - -
    -
    - -
    #define kh_destroy - -
    -
    - -
    #define kh_clear - -
    -
    - -
    #define kh_resize - -
    -
    - -
    #define kh_put - -
    -
    - -
    #define kh_put2 - -
    -
    - -
    #define kh_get - -
    -
    - -
    #define kh_del - -
    -
    - -
    #define kh_copy - -
    -
    - -
    #define kh_exist - -
    -
    - -
    #define kh_key - -
    -
    - -
    #define kh_val - -
    -
    - -
    #define kh_value - -
    -
    - -
    #define kh_begin - -
    -
    - -
    #define kh_end - -
    -
    - -
    #define kh_size - -
    -
    - -
    #define kh_n_buckets - -
    -
    - -
    #define kh_int_hash_func - -
    -
    - -
    #define kh_int_hash_equal - -
    -
    - -
    #define kh_int64_hash_func - -
    -
    - -
    #define kh_int64_hash_equal - -
    -
    - -
    #define kh_str_hash_func - -
    -
    - -
    #define kh_str_hash_equal - -
    -
    - -
    - - -

    Typedef Summary

    -
    - -
    typedef khint_t -
    -
    - -

    khash definitions used in mruby’s hash table.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    typedef khiter_t - -
    -
    - -
    typedef kh_cstr_t - -
    -
    - -
    - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fmempool.h.html b/docs/api/headers/mruby_2Fmempool.h.html deleted file mode 100644 index af0be11..0000000 --- a/docs/api/headers/mruby_2Fmempool.h.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - Header: mruby/mempool.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/mempool.h

    - - -

    - Function Summary - collapse -

    - - - - - -

    Typedef Summary

    -
    - -
    typedef mrb_mempool -
    -
    - -

    memory pool implementation

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    - -
    -

    Function Details

    - - -
    -

    - struct mrb_mempool* mrb_mempool_open(mrb_state* ) - - -

    - -
    - - -
    -

    - void mrb_mempool_close(struct mrb_mempool* ) - - -

    - -
    - - -
    -

    - void* mrb_mempool_alloc(struct mrb_mempool* , size_t ) - - -

    - -
    - - -
    -

    - void* mrb_mempool_realloc(struct mrb_mempool* , void* , size_t oldlen, size_t newlen) - - -

    - -
    - - -
    -

    - mrb_bool mrb_mempool_can_realloc(struct mrb_mempool* , void* , size_t ) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fnumeric.h.html b/docs/api/headers/mruby_2Fnumeric.h.html deleted file mode 100644 index 51b6f99..0000000 --- a/docs/api/headers/mruby_2Fnumeric.h.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - Header: mruby/numeric.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/numeric.h

    -

    Overview

    -
    -
    - -

    utility functions

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_NUMERIC_H - -
    -
    - -
    #define TYPED_POSFIXABLE -
    -
    - -

    Numeric class and it’s sub-classes.

    - -

    Integer and Float

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define TYPED_NEGFIXABLE - -
    -
    - -
    #define TYPED_FIXABLE - -
    -
    - -
    #define POSFIXABLE - -
    -
    - -
    #define NEGFIXABLE - -
    -
    - -
    #define FIXABLE - -
    -
    - -
    #define FIXABLE_FLOAT - -
    -
    - -
    #define mrb_num_plus -
    -
    - -

    obsolete old names

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_num_minus - -
    -
    - -
    #define mrb_fixnum_to_str -
    -
    - -

    obsolete function(s); will be removed

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define __has_builtin - -
    -
    - -
    #define MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS - -
    -
    - -
    #define MRB_INT_OVERFLOW_MASK - -
    -
    - -
    #define MRB_FLT_RADIX - -
    -
    - -
    #define MRB_FLT_MANT_DIG - -
    -
    - -
    #define MRB_FLT_EPSILON - -
    -
    - -
    #define MRB_FLT_DIG - -
    -
    - -
    #define MRB_FLT_MIN_EXP - -
    -
    - -
    #define MRB_FLT_MIN - -
    -
    - -
    #define MRB_FLT_MIN_10_EXP - -
    -
    - -
    #define MRB_FLT_MAX_EXP - -
    -
    - -
    #define MRB_FLT_MAX - -
    -
    - -
    #define MRB_FLT_MAX_10_EXP - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_num_add(mrb_state * mrb, mrb_value x, mrb_value y) - - -

    -
    -
    - -

    utility functions

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_num_sub(mrb_state * mrb, mrb_value x, mrb_value y) - - -

    - -
    - - -
    -

    - mrb_value mrb_num_mul(mrb_state * mrb, mrb_value x, mrb_value y) - - -

    - -
    - - -
    -

    - mrb_value mrb_integer_to_str(mrb_state * mrb, mrb_value x, mrb_int base) - - -

    - -
    - - -
    -

    - char * mrb_int_to_cstr(char * buf, size_t len, mrb_int n, mrb_int base) - - -

    - -
    - - -
    -

    - mrb_value mrb_float_to_integer(mrb_state * mrb, mrb_value val) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fobject.h.html b/docs/api/headers/mruby_2Fobject.h.html deleted file mode 100644 index 3274e83..0000000 --- a/docs/api/headers/mruby_2Fobject.h.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - Header: mruby/object.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/object.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_OBJECT_H - -
    -
    - -
    #define MRB_OBJECT_HEADER - -
    -
    - -
    #define MRB_FLAG_TEST - -
    -
    - -
    #define mrb_basic_ptr - -
    -
    - -
    #define MRB_OBJ_IS_FROZEN - -
    -
    - -
    #define mrb_frozen_p - -
    -
    - -
    #define mrb_obj_ptr - -
    -
    - -
    #define mrb_special_const_p - -
    -
    - -
    #define mrb_static_assert_object_size - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fopcode.h.html b/docs/api/headers/mruby_2Fopcode.h.html deleted file mode 100644 index d099b98..0000000 --- a/docs/api/headers/mruby_2Fopcode.h.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - - Header: mruby/opcode.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/opcode.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_OPCODE_H - -
    -
    - -
    #define OP_L_STRICT - -
    -
    - -
    #define OP_L_CAPTURE - -
    -
    - -
    #define OP_L_METHOD - -
    -
    - -
    #define OP_L_LAMBDA - -
    -
    - -
    #define OP_L_BLOCK - -
    -
    - -
    #define PEEK_B - -
    -
    - -
    #define PEEK_S - -
    -
    - -
    #define PEEK_W - -
    -
    - -
    #define READ_B - -
    -
    - -
    #define READ_S - -
    -
    - -
    #define READ_W - -
    -
    - -
    #define FETCH_Z - -
    -
    - -
    #define FETCH_B - -
    -
    - -
    #define FETCH_BB - -
    -
    - -
    #define FETCH_BBB - -
    -
    - -
    #define FETCH_BS - -
    -
    - -
    #define FETCH_BSS - -
    -
    - -
    #define FETCH_S - -
    -
    - -
    #define FETCH_W - -
    -
    - -
    #define FETCH_Z_1 -
    -
    - -

    with OP_EXT1 (1st 16bit)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define FETCH_B_1 - -
    -
    - -
    #define FETCH_BB_1 - -
    -
    - -
    #define FETCH_BBB_1 - -
    -
    - -
    #define FETCH_BS_1 - -
    -
    - -
    #define FETCH_BSS_1 - -
    -
    - -
    #define FETCH_S_1 - -
    -
    - -
    #define FETCH_W_1 - -
    -
    - -
    #define FETCH_Z_2 -
    -
    - -

    with OP_EXT2 (2nd 16bit)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define FETCH_B_2 - -
    -
    - -
    #define FETCH_BB_2 - -
    -
    - -
    #define FETCH_BBB_2 - -
    -
    - -
    #define FETCH_BS_2 - -
    -
    - -
    #define FETCH_BSS_2 - -
    -
    - -
    #define FETCH_S_2 - -
    -
    - -
    #define FETCH_W_2 - -
    -
    - -
    #define FETCH_Z_3 -
    -
    - -

    with OP_EXT3 (1st & 2nd 16bit)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define FETCH_B_3 - -
    -
    - -
    #define FETCH_BB_3 - -
    -
    - -
    #define FETCH_BBB_3 - -
    -
    - -
    #define FETCH_BS_3 - -
    -
    - -
    #define FETCH_BSS_3 - -
    -
    - -
    #define FETCH_S_3 - -
    -
    - -
    #define FETCH_W_3 - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fpresym.h.html b/docs/api/headers/mruby_2Fpresym.h.html deleted file mode 100644 index bb9d4e7..0000000 --- a/docs/api/headers/mruby_2Fpresym.h.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - Header: mruby/presym.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/presym.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_PRESYM_H - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fpresym_2Fdisable.h.html b/docs/api/headers/mruby_2Fpresym_2Fdisable.h.html deleted file mode 100644 index 5575e75..0000000 --- a/docs/api/headers/mruby_2Fpresym_2Fdisable.h.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - Header: mruby/presym/disable.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/presym/disable.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_PRESYM_DISABLE_H - -
    -
    - -
    #define MRB_PRESYM_MAX - -
    -
    - -
    #define MRB_OPSYM__not - -
    -
    - -
    #define MRB_OPSYM__mod - -
    -
    - -
    #define MRB_OPSYM__and - -
    -
    - -
    #define MRB_OPSYM__mul - -
    -
    - -
    #define MRB_OPSYM__add - -
    -
    - -
    #define MRB_OPSYM__sub - -
    -
    - -
    #define MRB_OPSYM__div - -
    -
    - -
    #define MRB_OPSYM__lt - -
    -
    - -
    #define MRB_OPSYM__gt - -
    -
    - -
    #define MRB_OPSYM__xor - -
    -
    - -
    #define MRB_OPSYM__tick - -
    -
    - -
    #define MRB_OPSYM__or - -
    -
    - -
    #define MRB_OPSYM__neg - -
    -
    - -
    #define MRB_OPSYM__neq - -
    -
    - -
    #define MRB_OPSYM__nmatch - -
    -
    - -
    #define MRB_OPSYM__andand - -
    -
    - -
    #define MRB_OPSYM__pow - -
    -
    - -
    #define MRB_OPSYM__plus - -
    -
    - -
    #define MRB_OPSYM__minus - -
    -
    - -
    #define MRB_OPSYM__lshift - -
    -
    - -
    #define MRB_OPSYM__le - -
    -
    - -
    #define MRB_OPSYM__eq - -
    -
    - -
    #define MRB_OPSYM__match - -
    -
    - -
    #define MRB_OPSYM__ge - -
    -
    - -
    #define MRB_OPSYM__rshift - -
    -
    - -
    #define MRB_OPSYM__aref - -
    -
    - -
    #define MRB_OPSYM__oror - -
    -
    - -
    #define MRB_OPSYM__cmp - -
    -
    - -
    #define MRB_OPSYM__eqq - -
    -
    - -
    #define MRB_OPSYM__aset - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fpresym_2Fenable.h.html b/docs/api/headers/mruby_2Fpresym_2Fenable.h.html deleted file mode 100644 index 9e22936..0000000 --- a/docs/api/headers/mruby_2Fpresym_2Fenable.h.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - Header: mruby/presym/enable.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/presym/enable.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_PRESYM_ENABLE_H - -
    -
    - -
    #define MRB_OPSYM - -
    -
    - -
    #define MRB_GVSYM - -
    -
    - -
    #define MRB_CVSYM - -
    -
    - -
    #define MRB_IVSYM - -
    -
    - -
    #define MRB_SYM_B - -
    -
    - -
    #define MRB_SYM_Q - -
    -
    - -
    #define MRB_SYM_E - -
    -
    - -
    #define MRB_SYM - -
    -
    - -
    #define MRB_OPSYM_2 - -
    -
    - -
    #define MRB_GVSYM_2 - -
    -
    - -
    #define MRB_CVSYM_2 - -
    -
    - -
    #define MRB_IVSYM_2 - -
    -
    - -
    #define MRB_SYM_B_2 - -
    -
    - -
    #define MRB_SYM_Q_2 - -
    -
    - -
    #define MRB_SYM_E_2 - -
    -
    - -
    #define MRB_SYM_2 - -
    -
    - -
    #define MRB_PRESYM_DEFINE_VAR_AND_INITER - -
    -
    - -
    #define MRB_PRESYM_INIT_SYMBOLS - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fpresym_2Fscanning.h.html b/docs/api/headers/mruby_2Fpresym_2Fscanning.h.html deleted file mode 100644 index 8f2dacb..0000000 --- a/docs/api/headers/mruby_2Fpresym_2Fscanning.h.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - Header: mruby/presym/scanning.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/presym/scanning.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_PRESYM_SCANNING_H - -
    -
    - -
    #define MRB_PRESYM_SCANNING_TAGGED - -
    -
    - -
    #define mrb_intern_cstr - -
    -
    - -
    #define mrb_define_method - -
    -
    - -
    #define mrb_define_class_method - -
    -
    - -
    #define mrb_define_singleton_method - -
    -
    - -
    #define mrb_define_class - -
    -
    - -
    #define mrb_define_class_under - -
    -
    - -
    #define mrb_define_module - -
    -
    - -
    #define mrb_define_module_under - -
    -
    - -
    #define mrb_define_module_function - -
    -
    - -
    #define mrb_define_const - -
    -
    - -
    #define mrb_define_global_const - -
    -
    - -
    #define mrb_define_alias - -
    -
    - -
    #define mrb_class_get - -
    -
    - -
    #define mrb_class_get_under - -
    -
    - -
    #define mrb_module_get - -
    -
    - -
    #define mrb_module_get_under - -
    -
    - -
    #define mrb_funcall - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fproc.h.html b/docs/api/headers/mruby_2Fproc.h.html deleted file mode 100644 index cabc902..0000000 --- a/docs/api/headers/mruby_2Fproc.h.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - - - - Header: mruby/proc.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/proc.h

    -

    Overview

    -
    -
    - -

    env object (for internal used)

    -
    • -

      don’t create multiple envs on one ci.

      -
    • -

      don’t share a env to different ci.

      -
    • -

      don’t attach a closed env to any ci.

      -
    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_PROC_H - -
    -
    - -
    #define MRB_ENV_SET_LEN -
    -
    - -

    flags (21bits): 5(ZERO):8(cioff/bidx):8(stack_len)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ENV_LEN - -
    -
    - -
    #define MRB_ENV_CLOSE - -
    -
    - -
    #define MRB_ENV_ONSTACK_P - -
    -
    - -
    #define MRB_ENV_BIDX - -
    -
    - -
    #define MRB_ENV_SET_BIDX - -
    -
    - -
    #define MRB_ASPEC_REQ -
    -
    - -

    aspec access

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_ASPEC_OPT - -
    -
    - -
    #define MRB_ASPEC_REST - -
    -
    - -
    #define MRB_ASPEC_POST - -
    -
    - -
    #define MRB_ASPEC_KEY - -
    -
    - -
    #define MRB_ASPEC_KDICT - -
    -
    - -
    #define MRB_ASPEC_BLOCK - -
    -
    - -
    #define MRB_PROC_CFUNC_FL - -
    -
    - -
    #define MRB_PROC_CFUNC_P - -
    -
    - -
    #define MRB_PROC_CFUNC - -
    -
    - -
    #define MRB_PROC_STRICT - -
    -
    - -
    #define MRB_PROC_STRICT_P - -
    -
    - -
    #define MRB_PROC_ORPHAN - -
    -
    - -
    #define MRB_PROC_ORPHAN_P - -
    -
    - -
    #define MRB_PROC_ENVSET - -
    -
    - -
    #define MRB_PROC_ENV_P - -
    -
    - -
    #define MRB_PROC_ENV - -
    -
    - -
    #define MRB_PROC_TARGET_CLASS - -
    -
    - -
    #define MRB_PROC_SET_TARGET_CLASS - -
    -
    - -
    #define MRB_PROC_SCOPE - -
    -
    - -
    #define MRB_PROC_SCOPE_P - -
    -
    - -
    #define MRB_PROC_NOARG - -
    -
    - -
    #define MRB_PROC_NOARG_P - -
    -
    - -
    #define MRB_PROC_ALIAS - -
    -
    - -
    #define MRB_PROC_ALIAS_P - -
    -
    - -
    #define mrb_proc_ptr - -
    -
    - -
    #define mrb_cfunc_env_get -
    -
    - -

    old name

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_METHOD_FUNC_FL - -
    -
    - -
    #define MRB_METHOD_NOARG_FL - -
    -
    - -
    #define MRB_METHOD_PUBLIC_FL - -
    -
    - -
    #define MRB_METHOD_PRIVATE_FL - -
    -
    - -
    #define MRB_METHOD_PROTECTED_FL - -
    -
    - -
    #define MRB_METHOD_VDEFAULT_FL - -
    -
    - -
    #define MRB_METHOD_VISIBILITY_MASK - -
    -
    - -
    #define MRB_METHOD_FUNC_P - -
    -
    - -
    #define MRB_METHOD_NOARG_P - -
    -
    - -
    #define MRB_METHOD_FUNC - -
    -
    - -
    #define MRB_METHOD_NOARG_SET - -
    -
    - -
    #define MRB_METHOD_FROM_FUNC - -
    -
    - -
    #define MRB_METHOD_FROM_PROC - -
    -
    - -
    #define MRB_METHOD_PROC_P - -
    -
    - -
    #define MRB_METHOD_PROC - -
    -
    - -
    #define MRB_METHOD_UNDEF_P - -
    -
    - -
    #define MRB_METHOD_VISIBILITY - -
    -
    - -
    #define MRB_SET_VISIBILITY - -
    -
    - -
    #define MRB_METHOD_SET_VISIBILITY - -
    -
    - -
    #define MRB_METHOD_CFUNC_P - -
    -
    - -
    #define MRB_METHOD_CFUNC -
    -
    - -

    use MRB_METHOD_CFUNC(m) only when MRB_METHOD_CFUNC_P(m) is true

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - struct RProc * mrb_proc_new_cfunc(mrb_state* , mrb_func_t ) - - -

    - -
    - - -
    -

    - struct RProc * mrb_closure_new_cfunc(mrb_state * mrb, mrb_func_t func, int nlocals) - - -

    - -
    - - -
    -

    - struct RProc * mrb_proc_new_cfunc_with_env(mrb_state * mrb, mrb_func_t func, mrb_int argc, const mrb_value * argv) - - -

    -
    -
    - -

    following functions are defined in mruby-proc-ext so please include it when using

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_proc_cfunc_env_get(mrb_state * mrb, mrb_int idx) - - -

    - -
    - - -
    -

    - mrb_value mrb_load_proc(mrb_state * mrb, const struct RProc * proc) - - -

    - -
    - - -
    -

    - void mrb_vm_ci_env_clear(mrb_state * mrb, mrb_callinfo * ci) - - -

    -
    -
    - -

    It can be used to isolate top-level scopes referenced by blocks generated by mrb_load_string_cxt() or similar called before entering the mruby VM (e.g. from main()). In that case, the ci parameter should be mrb->c->cibase.

    - -
    #include <mruby.h>
    -#include <mruby/compile.h>
    -#include <mruby/proc.h>
    -
    -int
    -main(int argc, char **argv)
    -{
    -  mrb_state *mrb;
    -  mrb_ccontext *cxt;
    -  mrb_value blk, ret;
    -
    -  mrb = mrb_open();
    -  cxt = mrb_ccontext_new(mrb);
    -  blk = mrb_load_string_cxt(mrb, "x, y, z = 1, 2, 3; proc { [x, y, z] }", cxt);
    -  mrb_vm_ci_env_clear(mrb, mrb->c->cibase);
    -  mrb_load_string_cxt(mrb, "x, y, z = 4, 5, 6", cxt);
    -  ret = mrb_funcall(mrb, blk, "call", 0);
    -  mrb_p(mrb, ret);  // => [1, 2, 3]
    -                    // => [4, 5, 6] if `mrb_vm_ci_env_clear()` is commented out
    -  mrb_ccontext_free(mrb, cxt);
    -  mrb_close(mrb);
    -
    -  return 0;
    -}
    -
    - -

    The top-level local variable names stored in mrb_ccontext are retained. Use also mrb_ccontext_cleanup_local_variables() at the same time, if necessary.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Frange.h.html b/docs/api/headers/mruby_2Frange.h.html deleted file mode 100644 index 2d75177..0000000 --- a/docs/api/headers/mruby_2Frange.h.html +++ /dev/null @@ -1,320 +0,0 @@ - - - - - - - Header: mruby/range.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/range.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_RANGE_H - -
    -
    - -
    #define MRB_RANGE_EMBED - -
    -
    - -
    #define mrb_gc_free_range - -
    -
    - -
    #define RANGE_BEG - -
    -
    - -
    #define RANGE_END - -
    -
    - -
    #define mrb_range_beg - -
    -
    - -
    #define mrb_range_end - -
    -
    - -
    #define mrb_range_excl_p - -
    -
    - -
    #define mrb_range_raw_ptr - -
    -
    - -
    #define mrb_range_value - -
    -
    - -
    #define RANGE_EXCL - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - struct RRange* mrb_range_ptr(mrb_state * mrb, mrb_value range) - - -

    - -
    - - -
    -

    - mrb_value mrb_range_new(mrb_state * mrb, mrb_value start, mrb_value end, mrb_bool exclude) - - -

    -
    -
    - -

    Initializes a Range.

    - -

    If the third parameter is FALSE then it includes the last value in the range. If the third parameter is TRUE then it excludes the last value in the range.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - start - - - - - - - — -
      -

      the beginning value.

      -
      - -
    • - -
    • - - end - - - - - - - — -
      -

      the ending value.

      -
      - -
    • - -
    • - - exclude - - - - - - - — -
      -

      represents the inclusion or exclusion of the last value.

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - enum mrb_range_beg_len(mrb_state * mrb, mrb_value range, mrb_int * begp, mrb_int * lenp, mrb_int len, mrb_bool trunc) - - -

    -
    -
    - -

    (failure) out of range

    - - -
    -
    -
    - - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fre.h.html b/docs/api/headers/mruby_2Fre.h.html deleted file mode 100644 index 0d51466..0000000 --- a/docs/api/headers/mruby_2Fre.h.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - Header: mruby/re.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/re.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_RE_H - -
    -
    - -
    #define REGEXP_CLASS - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fstring.h.html b/docs/api/headers/mruby_2Fstring.h.html deleted file mode 100644 index fbd1414..0000000 --- a/docs/api/headers/mruby_2Fstring.h.html +++ /dev/null @@ -1,2221 +0,0 @@ - - - - - - - Header: mruby/string.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/string.h

    -

    Overview

    -
    -
    - -

    String class

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_STRING_H - -
    -
    - -
    #define RSTRING_EMBED_LEN_MAX - -
    -
    - -
    #define RSTR_SET_TYPE - -
    -
    - -
    #define MRB_STR_NORMAL - -
    -
    - -
    #define MRB_STR_SHARED - -
    -
    - -
    #define MRB_STR_FSHARED - -
    -
    - -
    #define MRB_STR_NOFREE - -
    -
    - -
    #define MRB_STR_EMBED - -
    -
    - -
    #define MRB_STR_TYPE_MASK - -
    -
    - -
    #define MRB_STR_EMBED_LEN_SHIFT - -
    -
    - -
    #define MRB_STR_EMBED_LEN_BITS - -
    -
    - -
    #define MRB_STR_EMBED_LEN_MASK - -
    -
    - -
    #define MRB_STR_BINARY - -
    -
    - -
    #define MRB_STR_SINGLE_BYTE - -
    -
    - -
    #define MRB_STR_STATE_MASK - -
    -
    - -
    #define RSTR_EMBED_P - -
    -
    - -
    #define RSTR_SET_EMBED_FLAG - -
    -
    - -
    #define RSTR_SET_EMBED_LEN - -
    -
    - -
    #define RSTR_SET_LEN - -
    -
    - -
    #define RSTR_EMBED_PTR - -
    -
    - -
    #define RSTR_EMBED_LEN - -
    -
    - -
    #define RSTR_EMBEDDABLE_P - -
    -
    - -
    #define RSTR_PTR - -
    -
    - -
    #define RSTR_LEN - -
    -
    - -
    #define RSTR_CAPA - -
    -
    - -
    #define RSTR_SHARED_P - -
    -
    - -
    #define RSTR_FSHARED_P - -
    -
    - -
    #define RSTR_NOFREE_P - -
    -
    - -
    #define RSTR_SINGLE_BYTE_P - -
    -
    - -
    #define RSTR_SET_SINGLE_BYTE_FLAG - -
    -
    - -
    #define RSTR_UNSET_SINGLE_BYTE_FLAG - -
    -
    - -
    #define RSTR_WRITE_SINGLE_BYTE_FLAG - -
    -
    - -
    #define RSTR_COPY_SINGLE_BYTE_FLAG - -
    -
    - -
    #define RSTR_SET_ASCII_FLAG - -
    -
    - -
    #define RSTR_BINARY_P - -
    -
    - -
    #define mrb_str_ptr -
    -
    - -

    Returns a pointer from a Ruby string

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define RSTRING - -
    -
    - -
    #define RSTRING_PTR - -
    -
    - -
    #define RSTRING_EMBED_LEN - -
    -
    - -
    #define RSTRING_LEN - -
    -
    - -
    #define RSTRING_CAPA - -
    -
    - -
    #define RSTRING_END - -
    -
    - -
    #define RSTRING_CSTR - -
    -
    - -
    #define mrb_str_index_lit - -
    -
    - -
    #define mrb_str_buf_new - -
    -
    - -
    #define mrb_string_value_ptr -
    -
    - -

    obsolete: use RSTRING_PTR()

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_string_value_len -
    -
    - -

    obsolete: use RSTRING_LEN()

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_str_strlen -
    -
    - -

    obsolete: substituted by a macro; shall be removed

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_str_to_inum -
    -
    - -

    obsolete: use mrb_str_to_integer()

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_str_cat_lit - -
    -
    - -
    #define mrb_str_cat2 -
    -
    - -

    For backward compatibility

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define mrb_str_buf_cat - -
    -
    - -
    #define mrb_str_buf_append - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - void mrb_str_modify(mrb_state * mrb, struct RString * s) - - -

    - -
    - - -
    -

    - void mrb_str_modify_keep_ascii(mrb_state * mrb, struct RString * s) - - -

    -
    -
    - -

    mrb_str_modify() with keeping ASCII flag if set

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_int mrb_str_index(mrb_state * mrb, mrb_value str, const char * p, mrb_int len, mrb_int offset) - - -

    -
    -
    - -

    Finds the index of a substring in a string

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_str_concat(mrb_state * mrb, mrb_value self, mrb_value other) - - -

    -
    -
    - -

    Appends self to other. Returns self as a concatenated string.

    - -

    Example:

    - -
    int
    -main(int argc,
    -     char **argv)
    -{
    -  // Variable declarations.
    -  mrb_value str1;
    -  mrb_value str2;
    -
    -  mrb_state *mrb = mrb_open();
    -  if (!mrb)
    -  {
    -     // handle error
    -  }
    -
    -  // Creates new Ruby strings.
    -  str1 = mrb_str_new_lit(mrb, "abc");
    -  str2 = mrb_str_new_lit(mrb, "def");
    -
    -  // Concatenates str2 to str1.
    -  mrb_str_concat(mrb, str1, str2);
    -
    -  // Prints new Concatenated Ruby string.
    -  mrb_p(mrb, str1);
    -
    -  mrb_close(mrb);
    -  return 0;
    -}
    -
    - -

    Result:

    - -
    => "abcdef"
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      String to concatenate.

      -
      - -
    • - -
    • - - other - - - - - - - — -
      -

      String to append to self.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      Returns a new String appending other to self.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_plus(mrb_state * mrb, mrb_value a, mrb_value b) - - -

    -
    -
    - -

    Adds two strings together.

    - -

    Example:

    - -
    int
    -main(int argc,
    -     char **argv)
    -{
    -  // Variable declarations.
    -  mrb_value a;
    -  mrb_value b;
    -  mrb_value c;
    -
    -  mrb_state *mrb = mrb_open();
    -  if (!mrb)
    -  {
    -     // handle error
    -  }
    -
    -  // Creates two Ruby strings from the passed in C strings.
    -  a = mrb_str_new_lit(mrb, "abc");
    -  b = mrb_str_new_lit(mrb, "def");
    -
    -  // Prints both C strings.
    -  mrb_p(mrb, a);
    -  mrb_p(mrb, b);
    -
    -  // Concatenates both Ruby strings.
    -  c = mrb_str_plus(mrb, a, b);
    -
    -  // Prints new Concatenated Ruby string.
    -  mrb_p(mrb, c);
    -
    -  mrb_close(mrb);
    -  return 0;
    -}
    -
    - -

    Result:

    - -
    => "abc"  # First string
    -=> "def"  # Second string
    -=> "abcdef" # First & Second concatenated.
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - a - - - - - - - — -
      -

      First string to concatenate.

      -
      - -
    • - -
    • - - b - - - - - - - — -
      -

      Second string to concatenate.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      Returns a new String containing a concatenated to b.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_ptr_to_str(mrb_state * mrb, void * p) - - -

    -
    -
    - -

    Converts pointer into a Ruby string.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - p - - - - - - - — -
      -

      The pointer to convert to Ruby string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      Returns a new Ruby String.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_obj_as_string(mrb_state * mrb, mrb_value obj) - - -

    -
    -
    - -

    Returns an object as a Ruby string.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - obj - - - - - - - — -
      -

      An object to return as a Ruby string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      An object as a Ruby string.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_resize(mrb_state * mrb, mrb_value str, mrb_int len) - - -

    -
    -
    - -

    Resizes the string’s length. Returns the amount of characters in the specified by len.

    - -

    Example:

    - -
    int
    -main(int argc,
    -     char **argv)
    -{
    -    // Variable declaration.
    -    mrb_value str;
    -
    -    mrb_state *mrb = mrb_open();
    -    if (!mrb)
    -    {
    -       // handle error
    -    }
    -    // Creates a new string.
    -    str = mrb_str_new_lit(mrb, "Hello, world!");
    -    // Returns 5 characters of
    -    mrb_str_resize(mrb, str, 5);
    -    mrb_p(mrb, str);
    -
    -    mrb_close(mrb);
    -    return 0;
    - }
    -
    - -

    Result:

    - -
     => "Hello"
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      The Ruby string to resize.

      -
      - -
    • - -
    • - - len - - - - - - - — -
      -

      The length.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      An object as a Ruby string.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_substr(mrb_state * mrb, mrb_value str, mrb_int beg, mrb_int len) - - -

    -
    -
    - -

    Returns a sub string.

    - -

    Example:

    - -
    int
    -main(int argc,
    -char const **argv)
    -{
    -  // Variable declarations.
    -  mrb_value str1;
    -  mrb_value str2;
    -
    -  mrb_state *mrb = mrb_open();
    -  if (!mrb)
    -  {
    -    // handle error
    -  }
    -  // Creates new string.
    -  str1 = mrb_str_new_lit(mrb, "Hello, world!");
    -  // Returns a sub-string within the range of 0..2
    -  str2 = mrb_str_substr(mrb, str1, 0, 2);
    -
    -  // Prints sub-string.
    -  mrb_p(mrb, str2);
    -
    -  mrb_close(mrb);
    -  return 0;
    -}
    -
    - -

    Result:

    - -
    => "He"
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      Ruby string.

      -
      - -
    • - -
    • - - beg - - - - - - - — -
      -

      The beginning point of the sub-string.

      -
      - -
    • - -
    • - - len - - - - - - - — -
      -

      The end point of the sub-string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      An object as a Ruby sub-string.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_new_capa(mrb_state * mrb, mrb_int capa) - - -

    - -
    - - -
    -

    - mrb_value mrb_str_dup(mrb_state * mrb, mrb_value str) - - -

    -
    -
    - -

    Duplicates a string object.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      Ruby string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      Duplicated Ruby string.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_intern(mrb_state * mrb, mrb_value self) - - -

    -
    -
    - -

    Returns a symbol from a passed in Ruby string.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - self - - - - - - - — -
      -

      Ruby string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      A symbol.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_to_integer(mrb_state * mrb, mrb_value str, mrb_int base, mrb_bool badcheck) - - -

    - -
    - - -
    -

    - double mrb_str_to_dbl(mrb_state * mrb, mrb_value str, mrb_bool badcheck) - - -

    - -
    - - -
    -

    - mrb_bool mrb_str_equal(mrb_state * mrb, mrb_value str1, mrb_value str2) - - -

    -
    -
    - -

    Returns true if the strings match and false if the strings don’t match.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str1 - - - - - - - — -
      -

      Ruby string to compare.

      -
      - -
    • - -
    • - - str2 - - - - - - - — -
      -

      Ruby string to compare.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      boolean value.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_str_cat(mrb_state * mrb, mrb_value str, const char * ptr, size_t len) - - -

    -
    -
    - -

    Returns a concatenated string comprised of a Ruby string and a C string.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      Ruby string.

      -
      - -
    • - -
    • - - ptr - - - - - - - — -
      -

      A C string.

      -
      - -
    • - -
    • - - len - - - - - - - — -
      -

      length of C string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      A Ruby string.

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - mrb_value mrb_str_cat_cstr(mrb_state * mrb, mrb_value str, const char * ptr) - - -

    -
    -
    - -

    Returns a concatenated string comprised of a Ruby string and a C string.

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      Ruby string.

      -
      - -
    • - -
    • - - ptr - - - - - - - — -
      -

      A C string.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (mrb_value) - - - - — -
      -

      A Ruby string.

      -
      - -
    • - -
    - -

    See Also:

    - - -
    - - -
    - - -
    -

    - mrb_value mrb_str_cat_str(mrb_state * mrb, mrb_value str, mrb_value str2) - - -

    - -
    - - -
    -

    - mrb_value mrb_str_append(mrb_state * mrb, mrb_value str, mrb_value str2) - - -

    -
    -
    - -

    Adds str2 to the end of str1.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - int mrb_str_cmp(mrb_state * mrb, mrb_value str1, mrb_value str2) - - -

    -
    -
    - -

    Returns 0 if both Ruby strings are equal. Returns a value < 0 if Ruby str1 is less than Ruby str2. Returns a value > 0 if Ruby str2 is greater than Ruby str1.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - char * mrb_str_to_cstr(mrb_state * mrb, mrb_value str) - - -

    -
    -
    - -

    Returns a newly allocated C string from a Ruby string. This is an utility function to pass a Ruby string to C library functions.

    -
    • -

      Returned string does not contain any NUL characters (but terminator).

      -
    • -

      It raises an ArgumentError exception if Ruby string contains NUL characters.

      -
    • -

      Returned string will be freed automatically on next GC.

      -
    • -

      Caller can modify returned string without affecting Ruby string (e.g. it can be used for mkstemp(3)).

      -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The current mruby state.

      -
      - -
    • - -
    • - - str - - - - - - - — -
      -

      Ruby string. Must be an instance of String.

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (char *) - - - - — -
      -

      A newly allocated C string.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fthrow.h.html b/docs/api/headers/mruby_2Fthrow.h.html deleted file mode 100644 index a496e5c..0000000 --- a/docs/api/headers/mruby_2Fthrow.h.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - Header: mruby/throw.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/throw.h

    - - - -

    Define Summary

    -
    - -
    #define MRB_THROW_H - -
    -
    - -
    #define MRB_TRY - -
    -
    - -
    #define MRB_CATCH - -
    -
    - -
    #define MRB_END_EXC - -
    -
    - -
    #define MRB_THROW - -
    -
    - -
    #define MRB_SETJMP - -
    -
    - -
    #define MRB_LONGJMP - -
    -
    - -
    #define mrb_jmpbuf_impl - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Ftime.h.html b/docs/api/headers/mruby_2Ftime.h.html deleted file mode 100644 index 8c09028..0000000 --- a/docs/api/headers/mruby_2Ftime.h.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - Header: mruby/time.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/time.h

    - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_TIME_H - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_time_at(mrb_state * mrb, time_t sec, time_t usec, mrb_timezone timezone) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fvalue.h.html b/docs/api/headers/mruby_2Fvalue.h.html deleted file mode 100644 index 60e1f9a..0000000 --- a/docs/api/headers/mruby_2Fvalue.h.html +++ /dev/null @@ -1,1125 +0,0 @@ - - - - - - - Header: mruby/value.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/value.h

    -

    Overview

    -
    -
    - -

    mruby Symbol. You can create an mrb_sym by simply using mrb_str_intern() or mrb_intern_cstr()

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_VALUE_H - -
    -
    - -
    #define FALSE - -
    -
    - -
    #define TRUE - -
    -
    - -
    #define PRIo64 - -
    -
    - -
    #define PRId64 - -
    -
    - -
    #define PRIu64 - -
    -
    - -
    #define PRIx64 - -
    -
    - -
    #define PRIo16 - -
    -
    - -
    #define PRId16 - -
    -
    - -
    #define PRIu16 - -
    -
    - -
    #define PRIx16 - -
    -
    - -
    #define PRIo32 - -
    -
    - -
    #define PRId32 - -
    -
    - -
    #define PRIu32 - -
    -
    - -
    #define PRIx32 - -
    -
    - -
    #define MRB_INT_BIT - -
    -
    - -
    #define MRB_INT_MIN - -
    -
    - -
    #define MRB_INT_MAX - -
    -
    - -
    #define MRB_PRIo - -
    -
    - -
    #define MRB_PRId - -
    -
    - -
    #define MRB_PRIx - -
    -
    - -
    #define MRB_ENDIAN_LOHI - -
    -
    - -
    #define vsnprintf - -
    -
    - -
    #define snprintf - -
    -
    - -
    #define isfinite - -
    -
    - -
    #define isnan - -
    -
    - -
    #define isinf - -
    -
    - -
    #define signbit - -
    -
    - -
    #define INFINITY - -
    -
    - -
    #define NAN - -
    -
    - -
    #define MRB_VTYPE_FOREACH - -
    -
    - -
    #define MRB_TT_DATA -
    -
    - -

    obsolete name for MRB_TT_CDATA

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_VTYPE_TYPEOF - -
    -
    - -
    #define MRB_VTYPE_TYPEDEF - -
    -
    - -
    #define MRB_TT_FIXNUM -
    -
    - -

    for compatibility

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_SSIZE_MAX - -
    -
    - -
    #define mrb_immediate_p - -
    -
    - -
    #define mrb_integer_p - -
    -
    - -
    #define mrb_fixnum_p - -
    -
    - -
    #define mrb_symbol_p - -
    -
    - -
    #define mrb_undef_p - -
    -
    - -
    #define mrb_nil_p - -
    -
    - -
    #define mrb_false_p - -
    -
    - -
    #define mrb_true_p - -
    -
    - -
    #define mrb_float_p - -
    -
    - -
    #define mrb_array_p - -
    -
    - -
    #define mrb_string_p - -
    -
    - -
    #define mrb_hash_p - -
    -
    - -
    #define mrb_cptr_p - -
    -
    - -
    #define mrb_exception_p - -
    -
    - -
    #define mrb_free_p - -
    -
    - -
    #define mrb_object_p - -
    -
    - -
    #define mrb_class_p - -
    -
    - -
    #define mrb_module_p - -
    -
    - -
    #define mrb_iclass_p - -
    -
    - -
    #define mrb_sclass_p - -
    -
    - -
    #define mrb_proc_p - -
    -
    - -
    #define mrb_range_p - -
    -
    - -
    #define mrb_env_p - -
    -
    - -
    #define mrb_data_p - -
    -
    - -
    #define mrb_fiber_p - -
    -
    - -
    #define mrb_istruct_p - -
    -
    - -
    #define mrb_break_p - -
    -
    - -
    #define mrb_bool - -
    -
    - -
    #define mrb_test - -
    -
    - -
    #define mrb_bigint_p - -
    -
    - - -
    - -
    #define mrb_ro_data_p - -
    -
    - -
    - - -

    Typedef Summary

    -
    - -
    typedef mrb_sym -
    -
    - -

    mruby Symbol. You can create an mrb_sym by simply using mrb_str_intern() or mrb_intern_cstr()

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    typedef mrb_int - -
    -
    - -
    typedef mrb_uint - -
    -
    - -
    typedef mrb_float - -
    -
    - -
    typedef mrb_value -
    -
    -
    - This typedef is abstract. -
    -
    - -

    mruby value boxing.

    - -

    Actual implementation depends on configured boxing type.

    - - -
    -
    - - - -
    -
    - -
    typedef mrb_ssize - -
    -
    - -
    - -
    -

    Function Details

    - - -
    -

    - mrb_bool mrb_read_int(const char * p, const char * e, char * , endp , mrb_int * np) - - -

    - -
    - - -
    -

    - mrb_int mrb_int_read(const char* , const char* , char* ) - - -

    -
    -
    - -

    obsolete; do not use mrb_int_read()

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_bool mrb_read_float(const char * p, char * , endp , double * fp) - - -

    - -
    - - -
    -

    - double mrb_float_read(const char * p, char * , endp ) - - -

    -
    -
    - -

    obsolete; do not use mrb_float_read()

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - int mrb_msvc_vsnprintf(char * s, size_t n, const char * format, va_list arg) - - -

    - -
    - - -
    -

    - int mrb_msvc_snprintf(char * s, size_t n, const char * format, ... ) - - -

    - -
    - - -
    -

    - mrb_value mrb_float_value(struct mrb_state * mrb, mrb_float f) - - -

    - -
    - - -
    -

    - mrb_value mrb_cptr_value(struct mrb_state * mrb, void * p) - - -

    - -
    - - -
    -

    - mrb_value mrb_int_value(struct mrb_state * mrb, mrb_int i) - - -

    -
    -
    - -

    Returns an integer in Ruby.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_fixnum_value(mrb_int i) - - -

    - -
    - - -
    -

    - mrb_value mrb_symbol_value(mrb_sym i) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_value(void * p) - - -

    - -
    - - -
    -

    - mrb_value mrb_nil_value(void) - - -

    -
    -
    - -

    Get a nil mrb_value object.

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      nil mrb_value object reference.

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - mrb_value mrb_false_value(void) - - -

    -
    -
    - -

    Returns false in Ruby.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_true_value(void) - - -

    -
    -
    - -

    Returns true in Ruby.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_bool_value(mrb_bool boolean) - - -

    - -
    - - -
    -

    - mrb_value mrb_undef_value(void) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fvariable.h.html b/docs/api/headers/mruby_2Fvariable.h.html deleted file mode 100644 index bd0917d..0000000 --- a/docs/api/headers/mruby_2Fvariable.h.html +++ /dev/null @@ -1,974 +0,0 @@ - - - - - - - Header: mruby/variable.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/variable.h

    -

    Overview

    -
    -
    - -

    Functions to access mruby variables.

    - - -
    -
    -
    - - -
    - - - -

    - Function Summary - collapse -

    - - - - -

    Define Summary

    -
    - -
    #define MRUBY_VARIABLE_H - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -

    - mrb_value mrb_const_get(mrb_state* , mrb_value , mrb_sym ) - - -

    -
    -
    - -

    Functions to access mruby variables.

    - - -
    -
    -
    - - -
    - - -
    - - -
    -

    - void mrb_const_set(mrb_state* , mrb_value , mrb_sym , mrb_value ) - - -

    - -
    - - -
    -

    - mrb_bool mrb_const_defined(mrb_state* , mrb_value , mrb_sym ) - - -

    - -
    - - -
    -

    - void mrb_const_remove(mrb_state* , mrb_value , mrb_sym ) - - -

    - -
    - - -
    -

    - mrb_bool mrb_iv_name_sym_p(mrb_state * mrb, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_iv_name_sym_check(mrb_state * mrb, mrb_sym sym) - - -

    - -
    - - -
    -

    - mrb_value mrb_obj_iv_get(mrb_state * mrb, struct RObject * obj, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_obj_iv_set(mrb_state * mrb, struct RObject * obj, mrb_sym sym, mrb_value v) - - -

    - -
    - - -
    -

    - mrb_bool mrb_obj_iv_defined(mrb_state * mrb, struct RObject * obj, mrb_sym sym) - - -

    - -
    - - -
    -

    - mrb_value mrb_iv_get(mrb_state * mrb, mrb_value obj, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_iv_set(mrb_state * mrb, mrb_value obj, mrb_sym sym, mrb_value v) - - -

    - -
    - - -
    -

    - mrb_bool mrb_iv_defined(mrb_state* , mrb_value , mrb_sym ) - - -

    - -
    - - -
    -

    - mrb_value mrb_iv_remove(mrb_state * mrb, mrb_value obj, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_iv_copy(mrb_state * mrb, mrb_value dst, mrb_value src) - - -

    - -
    - - -
    -

    - mrb_bool mrb_const_defined_at(mrb_state * mrb, mrb_value mod, mrb_sym id) - - -

    - -
    - - -
    -

    - mrb_value mrb_gv_get(mrb_state * mrb, mrb_sym sym) - - -

    -
    -
    - -

    Get a global variable. Will return nil if the var does not exist

    - -

    Example:

    - -
    # Ruby style
    -var = $value
    -
    -!!!c
    -// C style
    -mrb_sym sym = mrb_intern_lit(mrb, "$value");
    -mrb_value var = mrb_gv_get(mrb, sym);
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference

      -
      - -
    • - -
    • - - sym - - - - - - - — -
      -

      The name of the global variable

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - - - - - -
      -

      The value of that global variable. May be nil

      -
      - -
    • - -
    - -
    - - -
    - - -
    -

    - void mrb_gv_set(mrb_state * mrb, mrb_sym sym, mrb_value val) - - -

    -
    -
    - -

    Set a global variable

    - -

    Example:

    - -
    # Ruby style
    -$value = "foo"
    -
    -!!!c
    -// C style
    -mrb_sym sym = mrb_intern_lit(mrb, "$value");
    -mrb_gv_set(mrb, sym, mrb_str_new_lit("foo"));
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference

      -
      - -
    • - -
    • - - sym - - - - - - - — -
      -

      The name of the global variable

      -
      - -
    • - -
    • - - val - - - - - - - — -
      -

      The value of the global variable

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - void mrb_gv_remove(mrb_state * mrb, mrb_sym sym) - - -

    -
    -
    - -

    Remove a global variable.

    - -

    Example:

    - -
    # Ruby style
    -$value = nil
    -
    -// C style
    -mrb_sym sym = mrb_intern_lit(mrb, "$value");
    -mrb_gv_remove(mrb, sym);
    -
    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - mrb - - - - - - - — -
      -

      The mruby state reference

      -
      - -
    • - -
    • - - sym - - - - - - - — -
      -

      The name of the global variable

      -
      - -
    • - -
    - - -
    - - -
    - - -
    -

    - mrb_value mrb_cv_get(mrb_state * mrb, mrb_value mod, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_mod_cv_set(mrb_state * mrb, struct RClass * c, mrb_sym sym, mrb_value v) - - -

    - -
    - - -
    -

    - void mrb_cv_set(mrb_state * mrb, mrb_value mod, mrb_sym sym, mrb_value v) - - -

    - -
    - - -
    -

    - mrb_bool mrb_cv_defined(mrb_state * mrb, mrb_value mod, mrb_sym sym) - - -

    - -
    - - -
    -

    - void mrb_iv_foreach(mrb_state * mrb, mrb_value obj, mrb_iv_foreach_func * func, void * p) - - -

    - -
    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/headers/mruby_2Fversion.h.html b/docs/api/headers/mruby_2Fversion.h.html deleted file mode 100644 index 0143cff..0000000 --- a/docs/api/headers/mruby_2Fversion.h.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - Header: mruby/version.h - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -

    Header: mruby/version.h

    - - - -

    Define Summary

    -
    - -
    #define MRUBY_VERSION_H - -
    -
    - -
    #define MRB_STRINGIZE0 -
    -
    - -

    A passed in expression.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRB_STRINGIZE -
    -
    - -

    Passes in an expression to MRB_STRINGIZE0.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RUBY_VERSION -
    -
    - -

    The version of Ruby used by mruby.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RUBY_ENGINE -
    -
    - -

    Ruby engine.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_MAJOR -
    -
    - -

    Major release version number.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_MINOR -
    -
    - -

    Minor release version number.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_TEENY -
    -
    - -

    Tiny release version number.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_PATCHLEVEL -
    -
    - -

    Patch level.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_PATCHLEVEL_STR -
    -
    - -

    Patch level string. (optional)

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_VERSION -
    -
    - -

    The mruby version.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_NO -
    -
    - -

    Release number.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_YEAR -
    -
    - -

    Release year.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_MONTH -
    -
    - -

    Release month.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_DAY -
    -
    - -

    Release day.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_DATE -
    -
    - -

    Release date as a string.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_RELEASE_YEAR_STR - -
    -
    - -
    #define MRUBY_RELEASE_MONTH_STR - -
    -
    - -
    #define MRUBY_RELEASE_DAY_STR - -
    -
    - -
    #define MRUBY_BIRTH_YEAR -
    -
    - -

    The year mruby was first created.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_AUTHOR -
    -
    - -

    mruby’s authors.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    #define MRUBY_DESCRIPTION -
    -
    - -

    mruby’s version, and release date.

    - - -
    -
    -
    - - -
    - - -
    -
    - -
    - - -
    -

    Function Details

    - - -
    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html deleted file mode 100644 index fa63539..0000000 --- a/docs/api/index.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - File: README - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -

    - - The mruby programming language - -

    -

    mruby

    - - GitHub Super-Linter - -
    -

    What is mruby

    - -

    mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard with more recent features provided by Ruby 3.x. Also, its syntax is Ruby 3.x compatible except for pattern matching.

    - -

    You can link and embed mruby within your application. The “mruby” interpreter program and the interactive “mirb” shell are provided as examples. You can also compile Ruby programs into compiled byte code using the “mrbc” compiler. All these tools are located in the “bin” directory. “mrbc” can also generate compiled byte code in a C source file. See the “mrbtest” program under the “test” directory for an example.

    - -

    This achievement was sponsored by the Regional Innovation Creation R&D Programs of the Ministry of Economy, Trade and Industry of Japan.

    - -

    How to get mruby

    - -

    To get mruby, you can download the stable version 3.4.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the “git clone” command. You can also install and compile mruby using ruby-install, ruby-build or rvm.

    - -

    The latest development version of mruby can be downloaded via the following URL: github.com/mruby/mruby/zipball/master

    - -

    The trunk of the mruby source tree can be checked out with the following command:

    - -
    $ git clone https://github.com/mruby/mruby.git
    -
    - -

    mruby homepage

    - -

    The URL of the mruby homepage is: mruby.org.

    - -

    Mailing list

    - -

    We don’t have a mailing list, but you can use GitHub issues.

    - -

    How to compile, test, and install (mruby and gems)

    - -

    For the simplest case, type

    - -
    rake all test
    -
    - -

    See the compile.md file for the detail.

    - -

    Building documentation

    - -

    There are two sets of documentation in mruby: the mruby API (generated by YARD) and C API (Doxygen and Graphviz)

    - -

    To build both of them, simply go

    - -
    rake doc
    -
    - -

    You can also view them in your browser

    - -
    rake view_api
    -rake view_capi
    -
    - -

    How to customize mruby (mrbgems)

    - -

    mruby contains a package manager called “mrbgems” that you can use to create extensions in C and/or Ruby. For a guide on how to use mrbgems, consult the mrbgems.md file, and for example code, refer to the examples/mrbgems/ folder.

    - -

    Index of Document

    - - -

    License

    - -

    mruby is released under the MIT License.

    - -

    Note for License

    - -

    mruby has chosen a MIT License due to its permissive license allowing developers to target various environments such as embedded systems. However, the license requires the display of the copyright notice and license information in manuals for instance. Doing so for big projects can be complicated or troublesome. This is why mruby has decided to display “mruby developers” as the copyright name to make it simple conventionally. In the future, mruby might ask you to distribute your new code (that you will commit,) under the MIT License as a member of “mruby developers” but contributors will keep their copyright. (We did not intend for contributors to transfer or waive their copyrights, actual copyright holder name (contributors) will be listed in the AUTHORS file.)

    - -

    Please ask us if you want to distribute your code under another license.

    - -

    How to Contribute

    - -

    To contribute to mruby, please refer to the contribution guidelines and send a pull request to the mruby GitHub repository. By contributing, you grant non-exclusive rights to your code under the MIT License.

    -
    - - - -
    - - \ No newline at end of file diff --git a/docs/api/js/app.js b/docs/api/js/app.js deleted file mode 100644 index b5610ef..0000000 --- a/docs/api/js/app.js +++ /dev/null @@ -1,344 +0,0 @@ -(function () { - var localStorage = {}, - sessionStorage = {}; - try { - localStorage = window.localStorage; - } catch (e) {} - try { - sessionStorage = window.sessionStorage; - } catch (e) {} - - function createSourceLinks() { - $(".method_details_list .source_code").before( - "[View source]" - ); - $(".toggleSource").toggle( - function () { - $(this).parent().nextAll(".source_code").slideDown(100); - $(this).text("Hide source"); - }, - function () { - $(this).parent().nextAll(".source_code").slideUp(100); - $(this).text("View source"); - } - ); - } - - function createDefineLinks() { - var tHeight = 0; - $(".defines").after(" more..."); - $(".toggleDefines").toggle( - function () { - tHeight = $(this).parent().prev().height(); - $(this).prev().css("display", "inline"); - $(this).parent().prev().height($(this).parent().height()); - $(this).text("(less)"); - }, - function () { - $(this).prev().hide(); - $(this).parent().prev().height(tHeight); - $(this).text("more..."); - } - ); - } - - function createFullTreeLinks() { - var tHeight = 0; - $(".inheritanceTree").toggle( - function () { - tHeight = $(this).parent().prev().height(); - $(this).parent().toggleClass("showAll"); - $(this).text("(hide)"); - $(this).parent().prev().height($(this).parent().height()); - }, - function () { - $(this).parent().toggleClass("showAll"); - $(this).parent().prev().height(tHeight); - $(this).text("show all"); - } - ); - } - - function searchFrameButtons() { - $(".full_list_link").click(function () { - toggleSearchFrame(this, $(this).attr("href")); - return false; - }); - window.addEventListener("message", function (e) { - if (e.data === "navEscape") { - $("#nav").slideUp(100); - $("#search a").removeClass("active inactive"); - $(window).focus(); - } - }); - - $(window).resize(function () { - if ($("#search:visible").length === 0) { - $("#nav").removeAttr("style"); - $("#search a").removeClass("active inactive"); - $(window).focus(); - } - }); - } - - function toggleSearchFrame(id, link) { - var frame = $("#nav"); - $("#search a").removeClass("active").addClass("inactive"); - if (frame.attr("src") === link && frame.css("display") !== "none") { - frame.slideUp(100); - $("#search a").removeClass("active inactive"); - } else { - $(id).addClass("active").removeClass("inactive"); - if (frame.attr("src") !== link) frame.attr("src", link); - frame.slideDown(100); - } - } - - function linkSummaries() { - $(".summary_signature").click(function () { - document.location = $(this).find("a").attr("href"); - }); - } - - function summaryToggle() { - $(".summary_toggle").click(function (e) { - e.preventDefault(); - localStorage.summaryCollapsed = $(this).text(); - $(".summary_toggle").each(function () { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll("ul.summary").first(); - if (next.hasClass("compact")) { - next.toggle(); - next.nextAll("ul.summary").first().toggle(); - } else if (next.hasClass("summary")) { - var list = $('
      '); - list.html(next.html()); - list.find(".summary_desc, .note").remove(); - list.find("a").each(function () { - $(this).html($(this).find("strong").html()); - $(this).parent().html($(this)[0].outerHTML); - }); - next.before(list); - next.toggle(); - } - }); - return false; - }); - if (localStorage.summaryCollapsed == "collapse") { - $(".summary_toggle").first().click(); - } else { - localStorage.summaryCollapsed = "expand"; - } - } - - function constantSummaryToggle() { - $(".constants_summary_toggle").click(function (e) { - e.preventDefault(); - localStorage.summaryCollapsed = $(this).text(); - $(".constants_summary_toggle").each(function () { - $(this).text($(this).text() == "collapse" ? "expand" : "collapse"); - var next = $(this).parent().parent().nextAll("dl.constants").first(); - if (next.hasClass("compact")) { - next.toggle(); - next.nextAll("dl.constants").first().toggle(); - } else if (next.hasClass("constants")) { - var list = $('
      '); - list.html(next.html()); - list.find("dt").each(function () { - $(this).addClass("summary_signature"); - $(this).text($(this).text().split("=")[0]); - if ($(this).has(".deprecated").length) { - $(this).addClass("deprecated"); - } - }); - // Add the value of the constant as "Tooltip" to the summary object - list.find("pre.code").each(function () { - console.log($(this).parent()); - var dt_element = $(this).parent().prev(); - var tooltip = $(this).text(); - if (dt_element.hasClass("deprecated")) { - tooltip = "Deprecated. " + tooltip; - } - dt_element.attr("title", tooltip); - }); - list.find(".docstring, .tags, dd").remove(); - next.before(list); - next.toggle(); - } - }); - return false; - }); - if (localStorage.summaryCollapsed == "collapse") { - $(".constants_summary_toggle").first().click(); - } else { - localStorage.summaryCollapsed = "expand"; - } - } - - function generateTOC() { - if ($("#filecontents").length === 0) return; - var _toc = $('
        '); - var show = false; - var toc = _toc; - var counter = 0; - var tags = ["h2", "h3", "h4", "h5", "h6"]; - var i; - var curli; - if ($("#filecontents h1").length > 1) tags.unshift("h1"); - for (i = 0; i < tags.length; i++) { - tags[i] = "#filecontents " + tags[i]; - } - var lastTag = parseInt(tags[0][1], 10); - $(tags.join(", ")).each(function () { - if ($(this).parents(".method_details .docstring").length != 0) return; - if (this.id == "filecontents") return; - show = true; - var thisTag = parseInt(this.tagName[1], 10); - if (this.id.length === 0) { - var proposedId = $(this).attr("toc-id"); - if (typeof proposedId != "undefined") this.id = proposedId; - else { - var proposedId = $(this) - .text() - .replace(/[^a-z0-9-]/gi, "_"); - if ($("#" + proposedId).length > 0) { - proposedId += counter; - counter++; - } - this.id = proposedId; - } - } - if (thisTag > lastTag) { - for (i = 0; i < thisTag - lastTag; i++) { - if (typeof curli == "undefined") { - curli = $("
      1. "); - toc.append(curli); - } - toc = $("
          "); - curli.append(toc); - curli = undefined; - } - } - if (thisTag < lastTag) { - for (i = 0; i < lastTag - thisTag; i++) { - toc = toc.parent(); - toc = toc.parent(); - } - } - var title = $(this).attr("toc-title"); - if (typeof title == "undefined") title = $(this).text(); - curli = $('
        1. ' + title + "
        2. "); - toc.append(curli); - lastTag = thisTag; - }); - if (!show) return; - html = - ''; - $("#content").prepend(html); - $("#toc").append(_toc); - $("#toc .hide_toc").toggle( - function () { - $("#toc .top").slideUp("fast"); - $("#toc").toggleClass("hidden"); - $("#toc .title small").toggle(); - }, - function () { - $("#toc .top").slideDown("fast"); - $("#toc").toggleClass("hidden"); - $("#toc .title small").toggle(); - } - ); - } - - function navResizeFn(e) { - if (e.which !== 1) { - navResizeFnStop(); - return; - } - - sessionStorage.navWidth = e.pageX.toString(); - $(".nav_wrap").css("width", e.pageX); - $(".nav_wrap").css("-ms-flex", "inherit"); - } - - function navResizeFnStop() { - $(window).unbind("mousemove", navResizeFn); - window.removeEventListener("message", navMessageFn, false); - } - - function navMessageFn(e) { - if (e.data.action === "mousemove") navResizeFn(e.data.event); - if (e.data.action === "mouseup") navResizeFnStop(); - } - - function navResizer() { - $("#resizer").mousedown(function (e) { - e.preventDefault(); - $(window).mousemove(navResizeFn); - window.addEventListener("message", navMessageFn, false); - }); - $(window).mouseup(navResizeFnStop); - - if (sessionStorage.navWidth) { - navResizeFn({ which: 1, pageX: parseInt(sessionStorage.navWidth, 10) }); - } - } - - function navExpander() { - if (typeof pathId === "undefined") return; - var done = false, - timer = setTimeout(postMessage, 500); - function postMessage() { - if (done) return; - clearTimeout(timer); - var opts = { action: "expand", path: pathId }; - document.getElementById("nav").contentWindow.postMessage(opts, "*"); - done = true; - } - - window.addEventListener( - "message", - function (event) { - if (event.data === "navReady") postMessage(); - return false; - }, - false - ); - } - - function mainFocus() { - var hash = window.location.hash; - if (hash !== "" && $(hash)[0]) { - $(hash)[0].scrollIntoView(); - } - - setTimeout(function () { - $("#main").focus(); - }, 10); - } - - function navigationChange() { - // This works around the broken anchor navigation with the YARD template. - window.onpopstate = function () { - var hash = window.location.hash; - if (hash !== "" && $(hash)[0]) { - $(hash)[0].scrollIntoView(); - } - }; - } - - $(document).ready(function () { - navResizer(); - navExpander(); - createSourceLinks(); - createDefineLinks(); - createFullTreeLinks(); - searchFrameButtons(); - linkSummaries(); - summaryToggle(); - constantSummaryToggle(); - generateTOC(); - mainFocus(); - navigationChange(); - }); -})(); diff --git a/docs/api/js/full_list.js b/docs/api/js/full_list.js deleted file mode 100644 index 12bba48..0000000 --- a/docs/api/js/full_list.js +++ /dev/null @@ -1,242 +0,0 @@ -(function() { - -var $clicked = $(null); -var searchTimeout = null; -var searchCache = []; -var caseSensitiveMatch = false; -var ignoreKeyCodeMin = 8; -var ignoreKeyCodeMax = 46; -var commandKey = 91; - -RegExp.escape = function(text) { - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); -} - -function escapeShortcut() { - $(document).keydown(function(evt) { - if (evt.which == 27) { - window.parent.postMessage('navEscape', '*'); - } - }); -} - -function navResizer() { - $(window).mousemove(function(e) { - window.parent.postMessage({ - action: 'mousemove', event: {pageX: e.pageX, which: e.which} - }, '*'); - }).mouseup(function(e) { - window.parent.postMessage({action: 'mouseup'}, '*'); - }); - window.parent.postMessage("navReady", "*"); -} - -function clearSearchTimeout() { - clearTimeout(searchTimeout); - searchTimeout = null; -} - -function enableLinks() { - // load the target page in the parent window - $('#full_list li').on('click', function(evt) { - $('#full_list li').removeClass('clicked'); - $clicked = $(this); - $clicked.addClass('clicked'); - evt.stopPropagation(); - - if (evt.target.tagName === 'A') return true; - - var elem = $clicked.find('> .item .object_link a')[0]; - var e = evt.originalEvent; - var newEvent = new MouseEvent(evt.originalEvent.type); - newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); - elem.dispatchEvent(newEvent); - evt.preventDefault(); - return false; - }); -} - -function enableToggles() { - // show/hide nested classes on toggle click - $('#full_list a.toggle').on('click', function(evt) { - evt.stopPropagation(); - evt.preventDefault(); - $(this).parent().parent().toggleClass('collapsed'); - $(this).attr('aria-expanded', function (i, attr) { - return attr == 'true' ? 'false' : 'true' - }); - highlight(); - }); - - // navigation of nested classes using keyboard - $('#full_list a.toggle').on('keypress',function(evt) { - // enter key is pressed - if (evt.which == 13) { - evt.stopPropagation(); - evt.preventDefault(); - $(this).parent().parent().toggleClass('collapsed'); - $(this).attr('aria-expanded', function (i, attr) { - return attr == 'true' ? 'false' : 'true' - }); - highlight(); - } - }); -} - -function populateSearchCache() { - $('#full_list li .item').each(function() { - var $node = $(this); - var $link = $node.find('.object_link a'); - if ($link.length > 0) { - searchCache.push({ - node: $node, - link: $link, - name: $link.text(), - fullName: $link.attr('title').split(' ')[0] - }); - } - }); -} - -function enableSearch() { - $('#search input').keyup(function(event) { - if (ignoredKeyPress(event)) return; - if (this.value === "") { - clearSearch(); - } else { - performSearch(this.value); - } - }); - - $('#full_list').after(""); -} - -function ignoredKeyPress(event) { - if ( - (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || - (event.keyCode == commandKey) - ) { - return true; - } else { - return false; - } -} - -function clearSearch() { - clearSearchTimeout(); - $('#full_list .found').removeClass('found').each(function() { - var $link = $(this).find('.object_link a'); - $link.text($link.text()); - }); - $('#full_list, #content').removeClass('insearch'); - $clicked.parents().removeClass('collapsed'); - highlight(); -} - -function performSearch(searchString) { - clearSearchTimeout(); - $('#full_list, #content').addClass('insearch'); - $('#noresults').text('').hide(); - partialSearch(searchString, 0); -} - -function partialSearch(searchString, offset) { - var lastRowClass = ''; - var i = null; - for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { - var item = searchCache[i]; - var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); - var matchString = buildMatchString(searchString); - var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); - if (searchName.match(matchRegexp) == null) { - item.node.removeClass('found'); - item.link.text(item.link.text()); - } - else { - item.node.addClass('found'); - item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); - lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; - item.link.html(item.name.replace(matchRegexp, "$&")); - } - } - if(i == searchCache.length) { - searchDone(); - } else { - searchTimeout = setTimeout(function() { - partialSearch(searchString, i); - }, 0); - } -} - -function searchDone() { - searchTimeout = null; - highlight(); - var found = $('#full_list li:visible').size(); - if (found === 0) { - $('#noresults').text('No results were found.'); - } else { - // This is read out to screen readers - $('#noresults').text('There are ' + found + ' results.'); - } - $('#noresults').show(); - $('#content').removeClass('insearch'); -} - -function buildMatchString(searchString, event) { - caseSensitiveMatch = searchString.match(/[A-Z]/) != null; - var regexSearchString = RegExp.escape(searchString); - if (caseSensitiveMatch) { - regexSearchString += "|" + - $.map(searchString.split(''), function(e) { return RegExp.escape(e); }). - join('.+?'); - } - return regexSearchString; -} - -function highlight() { - $('#full_list li:visible').each(function(n) { - $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); - }); -} - -/** - * Expands the tree to the target element and its immediate - * children. - */ -function expandTo(path) { - var $target = $(document.getElementById('object_' + path)); - $target.addClass('clicked'); - $target.removeClass('collapsed'); - $target.parentsUntil('#full_list', 'li').removeClass('collapsed'); - - $target.find('a.toggle').attr('aria-expanded', 'true') - $target.parentsUntil('#full_list', 'li').each(function(i, el) { - $(el).find('> div > a.toggle').attr('aria-expanded', 'true'); - }); - - if($target[0]) { - window.scrollTo(window.scrollX, $target.offset().top - 250); - highlight(); - } -} - -function windowEvents(event) { - var msg = event.data; - if (msg.action === "expand") { - expandTo(msg.path); - } - return false; -} - -window.addEventListener("message", windowEvents, false); - -$(document).ready(function() { - escapeShortcut(); - navResizer(); - enableLinks(); - enableToggles(); - populateSearchCache(); - enableSearch(); -}); - -})(); diff --git a/docs/api/js/jquery.js b/docs/api/js/jquery.js deleted file mode 100644 index 198b3ff..0000000 --- a/docs/api/js/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
          a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
          "+""+"
          ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
          t
          ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
          ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

          ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
          ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
          ","
          "],thead:[1,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],col:[2,"","
          "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
          ","
          "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
          ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/api/js/mruby.js b/docs/api/js/mruby.js deleted file mode 100644 index e69de29..0000000 diff --git a/docs/api/method_list.html b/docs/api/method_list.html deleted file mode 100644 index 30ebacf..0000000 --- a/docs/api/method_list.html +++ /dev/null @@ -1,3974 +0,0 @@ - - - - - - - - - - - - - - - - - - Method List - - - -
          -
          -

          Method List

          - - - -
          - - -
          - - diff --git a/docs/api/top-level-namespace.html b/docs/api/top-level-namespace.html deleted file mode 100644 index 83e551b..0000000 --- a/docs/api/top-level-namespace.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - Top Level Namespace - - — Documentation by YARD 0.9.37 - - - - - - - - - - - - - - - - - - - - - - - -
          - - -

          Top Level Namespace - - - -

          -
          - - - - - - - - - - - -
          - -

          Defined Under Namespace

          -

          - - - Modules: CMath, Comparable, Enumerable, Errno, Kernel, Math, ObjectSpace - - - - Classes: Addrinfo, ArgumentError, Array, BasicObject, BasicSocket, Complex, Dir, EOFError, Enumerator, Exception, File, Float, FloatDomainError, FrozenError, Hash, IO, IOError, IPSocket, IndexError, Integer, KeyError, LocalJumpError, Method, Module, NameError, NoMethodError, NotImplementedError, Numeric, Proc, Range, RangeError, Rational, RegexpError, Set, Socket, SocketError, StopIteration, String, Struct, Symbol, TCPServer, TCPSocket, TypeError, UDPSocket, UNIXServer, UNIXSocket, UncaughtThrowError, ZeroDivisionError - - -

          - - -

          - Constant Summary - collapse -

          - -
          - -
          STDIN = - -
          -
          IO.open(0, "r")
          - -
          STDOUT = - -
          -
          IO.open(1, "w")
          - -
          STDERR = - -
          -
          IO.open(2, "w")
          - -
          - - - - - - - - - - -
          - - - -
          - - \ No newline at end of file From ada908e1c109a4a50d2bc78a2eb2c5a6326cf3d9 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 19:40:56 +0100 Subject: [PATCH 24/40] Create deploy.yml --- .github/workflows/deploy.yml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..85863ab --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,56 @@ +name: Deploy + +on: + push: + branches: [master] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: false + + - name: Install dependencies + run: bundle install --with scripts + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + + - name: Generate and build + run: bundle exec rake build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JEKYLL_ENV: production + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site/ + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From d5ba06af1b18f850d67f503005c8fabe218ed772 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 21:45:11 +0100 Subject: [PATCH 25/40] Rename and tweak --- .github/workflows/{deploy.yml => pages.yml} | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) rename .github/workflows/{deploy.yml => pages.yml} (85%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/pages.yml similarity index 85% rename from .github/workflows/deploy.yml rename to .github/workflows/pages.yml index 85863ab..d15ac9a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Pages on: push: @@ -25,10 +25,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: .ruby-version - bundler-cache: false - - - name: Install dependencies - run: bundle install --with scripts + bundler-cache: true - name: Configure GitHub Pages uses: actions/configure-pages@v5 @@ -41,8 +38,6 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v3 - with: - path: _site/ deploy: environment: From 804fee188216d44dec7792d812046db5e7f4cec0 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 21:45:18 +0100 Subject: [PATCH 26/40] Remove groups --- Gemfile | 20 ++++---------------- Gemfile.lock | 15 --------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index e346ee9..e48e20e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,19 +1,7 @@ source 'https://rubygems.org' gem 'rake' -gem 'github-pages', group: :jekyll_plugins - -group :jekyll_plugins do - gem 'jekyll-avatar', '~> 0.8.0' - gem 'jekyll-feed' - gem 'jekyll-sitemap' -end - -group :scripts do - gem 'mgem' - gem 'git' - - # API Docs - gem 'yard-mruby' - gem 'yard-coderay' -end +gem 'github-pages' +gem 'jekyll-avatar', '~> 0.8.0' +gem 'jekyll-feed' +gem 'jekyll-sitemap' diff --git a/Gemfile.lock b/Gemfile.lock index e9ea7a4..aad9bbd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -232,7 +232,6 @@ GEM rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) mercenary (0.3.6) - mgem (0.3.0) mini_portile2 (2.8.9) minima (2.5.1) jekyll (>= 3.5, < 5.0) @@ -254,15 +253,12 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) prism (1.9.0) - process_executer (4.0.2) - track_open_instances (~> 0.1) public_suffix (5.1.1) racc (1.8.1) rake (13.3.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rchardet (1.10.0) rexml (3.4.2) rouge (3.30.0) rubyzip (2.3.2) @@ -279,7 +275,6 @@ GEM simpleidn (0.2.3) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - track_open_instances (0.1.15) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) @@ -287,27 +282,17 @@ GEM unicode-display_width (1.8.0) uri (1.1.1) webrick (1.8.2) - yard (0.9.36) - yard-coderay (0.1.0) - coderay - yard - yard-mruby (0.3.0) - yard (~> 0.9.0) PLATFORMS ruby x86_64-darwin-19 DEPENDENCIES - git github-pages jekyll-avatar (~> 0.8.0) jekyll-feed jekyll-sitemap - mgem rake - yard-coderay - yard-mruby BUNDLED WITH 2.4.1 From fe2f19a56fc319cc7560422ecc5c3c2aee2db7be Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 21:54:13 +0100 Subject: [PATCH 27/40] Bump Ruby and gems --- .ruby-version | 1 + Gemfile | 4 +- Gemfile.lock | 222 +-------------------------------------- assets/css/redesign.scss | 28 ++--- 4 files changed, 19 insertions(+), 236 deletions(-) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..1454f6e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +4.0.1 diff --git a/Gemfile b/Gemfile index e48e20e..e7005a7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' gem 'rake' -gem 'github-pages' -gem 'jekyll-avatar', '~> 0.8.0' +gem 'jekyll' +gem 'jekyll-avatar' gem 'jekyll-feed' gem 'jekyll-sitemap' diff --git a/Gemfile.lock b/Gemfile.lock index aad9bbd..88a3c85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,113 +1,18 @@ GEM remote: https://rubygems.org/ specs: - activesupport (8.1.3) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - json - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) - base64 (0.3.0) - bigdecimal (4.1.0) - coderay (1.1.3) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) colorator (1.1.0) - commonmarker (0.23.10) concurrent-ruby (1.3.6) - connection_pool (3.0.2) csv (3.3.0) - dnsruby (1.72.2) - simpleidn (~> 0.2.1) - drb (2.2.3) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) - ethon (0.16.0) - ffi (>= 1.15.0) eventmachine (1.2.7) - execjs (2.9.1) - faraday (2.14.1) - faraday-net_http (>= 2.0, < 3.5) - json - logger - faraday-net_http (3.4.2) - net-http (~> 0.5) ffi (1.17.0) ffi (1.17.0-x86_64-darwin) forwardable-extended (2.6.0) - gemoji (4.1.0) - git (4.3.2) - activesupport (>= 5.0) - addressable (~> 2.8) - process_executer (~> 4.0) - rchardet (~> 1.9) - github-pages (232) - github-pages-health-check (= 1.18.2) - jekyll (= 3.10.0) - jekyll-avatar (= 0.8.0) - jekyll-coffeescript (= 1.2.2) - jekyll-commonmark-ghpages (= 0.5.1) - jekyll-default-layout (= 0.1.5) - jekyll-feed (= 0.17.0) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.16.1) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.13.0) - kramdown (= 2.4.0) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.4) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.16.2, < 2.0) - rouge (= 3.30.0) - terminal-table (~> 1.4) - webrick (~> 1.8) - github-pages-health-check (1.18.2) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (>= 4, < 8) - public_suffix (>= 3.0, < 6.0) - typhoeus (~> 1.3) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) http_parser.rb (0.8.0) i18n (1.14.8) concurrent-ruby (~> 1.0) @@ -128,159 +33,36 @@ GEM webrick (>= 1.0) jekyll-avatar (0.8.0) jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.2.2) - coffee-script (~> 2.2) - coffee-script-source (~> 1.12) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.5.1) - commonmarker (>= 0.23.7, < 1.1.0) - jekyll (>= 3.9, < 4.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 5.0) - jekyll-default-layout (0.1.5) - jekyll (>= 3.0, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.16.1) - jekyll (>= 3.4, < 5.0) - octokit (>= 4, < 7, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - jemoji (0.13.0) - gemoji (>= 3, < 5) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - json (2.19.3) kramdown (2.4.0) rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) liquid (4.0.4) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.7.0) mercenary (0.3.6) - mini_portile2 (2.8.9) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (6.0.2) - drb (~> 2.0) - prism (~> 1.5) - net-http (0.9.1) - uri (>= 0.11.1) - nokogiri (1.19.1) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - nokogiri (1.19.1-x86_64-darwin) - racc (~> 1.4) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) pathutil (0.16.2) forwardable-extended (~> 2.6) - prism (1.9.0) public_suffix (5.1.1) - racc (1.8.1) rake (13.3.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rexml (3.4.2) rouge (3.30.0) - rubyzip (2.3.2) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - securerandom (0.4.1) - simpleidn (0.2.3) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (1.8.0) - uri (1.1.1) webrick (1.8.2) PLATFORMS @@ -288,8 +70,8 @@ PLATFORMS x86_64-darwin-19 DEPENDENCIES - github-pages - jekyll-avatar (~> 0.8.0) + jekyll + jekyll-avatar jekyll-feed jekyll-sitemap rake diff --git a/assets/css/redesign.scss b/assets/css/redesign.scss index 2c1ea0c..756023a 100644 --- a/assets/css/redesign.scss +++ b/assets/css/redesign.scss @@ -1,17 +1,17 @@ --- --- -@import "variables"; -@import "reset"; -@import "page-header"; -@import "navigation"; -@import "buttons"; -@import "latest-news"; -@import "footer"; -@import "downloads"; -@import "documentation"; -@import "inline-code"; -@import "about"; -@import "libraries"; -@import "team"; -@import "article"; +@use "variables"; +@use "reset"; +@use "page-header"; +@use "navigation"; +@use "buttons"; +@use "latest-news"; +@use "footer"; +@use "downloads"; +@use "documentation"; +@use "inline-code"; +@use "about"; +@use "libraries"; +@use "team"; +@use "article"; From 2aca136bd13e1c15f0344c0463c6f63a88f0146d Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:00:14 +0100 Subject: [PATCH 28/40] Add missing gems --- Gemfile | 6 ++- Gemfile.lock | 107 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 86 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index e7005a7..15bd8f2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,11 @@ source 'https://rubygems.org' -gem 'rake' gem 'jekyll' gem 'jekyll-avatar' gem 'jekyll-feed' gem 'jekyll-sitemap' +gem 'mgem' +gem 'rake' +gem 'yard-coderay' +gem 'yard-mruby' +gem 'irb' diff --git a/Gemfile.lock b/Gemfile.lock index 88a3c85..cffaa25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,78 +3,133 @@ GEM specs: addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) + base64 (0.3.0) + bigdecimal (4.1.1) + coderay (1.1.3) colorator (1.1.0) concurrent-ruby (1.3.6) - csv (3.3.0) + csv (3.3.5) + date (3.5.1) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) + erb (6.0.2) eventmachine (1.2.7) - ffi (1.17.0) - ffi (1.17.0-x86_64-darwin) + ffi (1.17.4) + ffi (1.17.4-x86_64-darwin) forwardable-extended (2.6.0) - http_parser.rb (0.8.0) + google-protobuf (4.34.1) + bigdecimal + rake (~> 13.3) + google-protobuf (4.34.1-x86_64-darwin) + bigdecimal + rake (~> 13.3) + http_parser.rb (0.8.1) i18n (1.14.8) concurrent-ruby (~> 1.0) - jekyll (3.10.0) + io-console (0.8.2) + irb (1.17.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + jekyll (4.4.1) addressable (~> 2.4) + base64 (~> 0.2) colorator (~> 1.0) csv (~> 3.0) em-websocket (~> 0.5) - i18n (>= 0.7, < 2) - jekyll-sass-converter (~> 1.0) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) + json (~> 2.6) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.3.3) + mercenary (~> 0.3, >= 0.3.6) pathutil (~> 0.9) - rouge (>= 1.7, < 4) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - webrick (>= 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) jekyll-avatar (0.8.0) jekyll (>= 3.0, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) + jekyll-sass-converter (3.1.0) + sass-embedded (~> 1.75) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (2.4.0) - rexml + json (2.19.3) + kramdown (2.5.2) + rexml (>= 3.4.4) + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) liquid (4.0.4) - listen (3.9.0) + listen (3.10.0) + logger rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) + logger (1.7.0) + mercenary (0.4.0) + mgem (0.3.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (5.1.1) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + psych (5.3.1) + date + stringio + public_suffix (7.0.5) rake (13.3.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.4.2) - rouge (3.30.0) + rdoc (7.2.0) + erb + psych (>= 4.0.0) + tsort + reline (0.6.3) + io-console (~> 0.5) + rexml (3.4.4) + rouge (4.7.0) safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - webrick (1.8.2) + sass-embedded (1.99.0) + google-protobuf (~> 4.31) + rake (>= 13) + sass-embedded (1.99.0-x86_64-darwin) + google-protobuf (~> 4.31) + stringio (3.2.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + tsort (0.2.0) + unicode-display_width (2.6.0) + webrick (1.9.2) + yard (0.9.40) + yard-coderay (0.1.0) + coderay + yard + yard-mruby (0.3.0) + yard (~> 0.9.0) PLATFORMS ruby x86_64-darwin-19 DEPENDENCIES + irb jekyll jekyll-avatar jekyll-feed jekyll-sitemap + mgem rake + yard-coderay + yard-mruby BUNDLED WITH 2.4.1 From 352d0e077dc7b91a3f5f37ceb2c70bbc629a1609 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:00:53 +0100 Subject: [PATCH 29/40] Rename redesign to default --- _includes/_latest_news.html | 19 --- _includes/footer.html | 26 ++-- _includes/{redesign_head.html => head.html} | 2 +- _includes/header.html | 18 --- _includes/{redesign_nav.html => nav.html} | 0 _includes/navigation.html | 32 ----- _includes/redesign_footer.html | 13 -- _layouts/default.html | 33 ++--- _layouts/post.html | 6 +- _layouts/redesign.html | 25 ---- about/index.html | 2 +- assets/css/main.css | 134 -------------------- assets/css/{redesign.scss => main.scss} | 0 docs/index.html | 2 +- downloads/index.html | 2 +- index.html | 2 +- libraries/index.html | 2 +- team/index.html | 2 +- 18 files changed, 40 insertions(+), 280 deletions(-) delete mode 100644 _includes/_latest_news.html rename _includes/{redesign_head.html => head.html} (94%) delete mode 100644 _includes/header.html rename _includes/{redesign_nav.html => nav.html} (100%) delete mode 100644 _includes/navigation.html delete mode 100644 _includes/redesign_footer.html delete mode 100644 _layouts/redesign.html delete mode 100644 assets/css/main.css rename assets/css/{redesign.scss => main.scss} (100%) diff --git a/_includes/_latest_news.html b/_includes/_latest_news.html deleted file mode 100644 index 0890037..0000000 --- a/_includes/_latest_news.html +++ /dev/null @@ -1,19 +0,0 @@ -
          -
          -

          Latest News

          -
          -
          -
          -
          -
            - {% for post in site.posts %} -
          • -

            - {{ post.date | date_to_string }}: - {{ post.title }} -

            -
          • - {% endfor %} -
          -
          -
          diff --git a/_includes/footer.html b/_includes/footer.html index 040ba8a..819d51c 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,13 +1,13 @@ - + diff --git a/_includes/redesign_head.html b/_includes/head.html similarity index 94% rename from _includes/redesign_head.html rename to _includes/head.html index 1260641..b69d576 100644 --- a/_includes/redesign_head.html +++ b/_includes/head.html @@ -11,7 +11,7 @@ - + diff --git a/_includes/header.html b/_includes/header.html deleted file mode 100644 index a3ab86b..0000000 --- a/_includes/header.html +++ /dev/null @@ -1,18 +0,0 @@ - - - {{ page.title }} - - {% include icons.html %} - - - - - - - - - - - - - diff --git a/_includes/redesign_nav.html b/_includes/nav.html similarity index 100% rename from _includes/redesign_nav.html rename to _includes/nav.html diff --git a/_includes/navigation.html b/_includes/navigation.html deleted file mode 100644 index 6b67e0f..0000000 --- a/_includes/navigation.html +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/_includes/redesign_footer.html b/_includes/redesign_footer.html deleted file mode 100644 index 819d51c..0000000 --- a/_includes/redesign_footer.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/_layouts/default.html b/_layouts/default.html index a9b06f6..2879af4 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,24 +1,25 @@ - {% include header.html %} + {% include head.html %} - - {% include navigation.html %} - -
          - -
          -
          - - {{ content }} - -
          -
          + {% include nav.html %} +
          + {{ content }}
          - {% include footer.html %} - + - \ No newline at end of file + diff --git a/_layouts/post.html b/_layouts/post.html index 0bcffc1..c12e786 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,10 +1,10 @@ - {% include redesign_head.html %} + {% include head.html %} - {% include redesign_nav.html %} + {% include nav.html %}
          @@ -37,7 +37,7 @@

          {{ page.title }}

          - {% include redesign_footer.html %} + {% include footer.html %} - - diff --git a/about/index.html b/about/index.html index cc4138c..708f8d6 100644 --- a/about/index.html +++ b/about/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby — About --- diff --git a/assets/css/main.css b/assets/css/main.css deleted file mode 100644 index 339fd9c..0000000 --- a/assets/css/main.css +++ /dev/null @@ -1,134 +0,0 @@ -a { - color: #ce2812; -} - -.container { - padding-top: 120px; -} - -.navbar-header img { - margin-left: 160px; - top:0; - position: absolute; -} - -.footer { - padding-top: 20px; - margin-top: 20px; - text-align: center; -} - -.navbar-mruby { - background-color: transparent; - background-image: url('/assets/images/navigation_bg.png'); - border: 0px; - position: fixed; - top: 0px; - right: 0px; - left: 0px; - z-index: 100; - height: unset; -} - -.navbar-mruby .navbar-brand { - color: #ce2812; -} -.navbar-mruby .navbar-brand:hover, .navbar-mruby .navbar-brand:focus { - color: #f00; -} -.navbar-mruby .navbar-text { - color: #ce2812; -} - -.navbar-mruby .navbar-nav { - float: right; - padding-right: 120px; -} - -.navbar-nav > li { - float: left; -} - -.navbar-mruby .navbar-nav > li > a { - padding: 15px 22px!important; - color: #ce2812; -} -.navbar-mruby .navbar-nav > li > a:hover, .navbar-mruby .navbar-nav > li > a:focus { - color: #fff; - background-color: #ce2812; -} -.navbar-mruby .navbar-nav > .active > a, .navbar-mruby .navbar-nav > .active > a:hover, .navbar-mruby .navbar-nav > .active > a:focus { - color: #f00; - background-color: #eee; -} -.navbar-mruby .navbar-nav > .open > a, .navbar-mruby .navbar-nav > .open > a:hover, .navbar-mruby .navbar-nav > .open > a:focus { - color: #f00; - background-color: #eee; -} -.navbar-mruby .navbar-toggle { - border-color: #eee; -} -.navbar-mruby .navbar-toggle:hover, .navbar-mruby .navbar-toggle:focus { - background-color: #eee; -} -.navbar-mruby .navbar-toggle .icon-bar { - background-color: #ce2812; -} -.navbar-mruby .navbar-collapse, -.navbar-mruby .navbar-form { - border-color: #ce2812; -} -.navbar-mruby .navbar-link { - color: #ce2812; -} -.navbar-mruby .navbar-link:hover { - color: #f00; - background-color: #000; -} - -@media (max-width: 950px) { - .navbar-header img { - margin-left: 0px; - margin-right: 20px; - } -} - -@media (max-width: 767px) { - .navbar-mruby .navbar-nav .open .dropdown-menu > li > a { - color: #ce2812; - } - .navbar-mruby .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-mruby .navbar-nav .open .dropdown-menu > li > a:focus { - color: #f00; - } - .navbar-mruby .navbar-nav .open .dropdown-menu > .active > a, .navbar-mruby .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-mruby .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #f00; - background-color: #eee; - } -} - -.mruby-is { - padding: 5px 20px 20px 20px; - border-bottom: 1px solid #e5e5e5; -} - -.mruby-is p { - font-size: 150%; - padding-top: 15px; -} - -.mruby-is-get { - text-align: center; - padding-top: 5px; -} - -.mruby-is img { - width: auto; - height: 90px; - float: left; - padding-right: 20px; -} - -table td,th { - border:2px solid #eee; - padding:4px; -} diff --git a/assets/css/redesign.scss b/assets/css/main.scss similarity index 100% rename from assets/css/redesign.scss rename to assets/css/main.scss diff --git a/docs/index.html b/docs/index.html index 364c197..30a1b0b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby - Documentation --- diff --git a/downloads/index.html b/downloads/index.html index b87ced4..f359407 100644 --- a/downloads/index.html +++ b/downloads/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby - Downloads --- diff --git a/index.html b/index.html index bb5be2c..9cb2ce4 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby - Lightweight Ruby --- diff --git a/libraries/index.html b/libraries/index.html index 649af8f..21dbd25 100644 --- a/libraries/index.html +++ b/libraries/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby - Libraries --- diff --git a/team/index.html b/team/index.html index 4313fbc..19ef01c 100644 --- a/team/index.html +++ b/team/index.html @@ -1,5 +1,5 @@ --- -layout: redesign +layout: default title: mruby — Team --- From 4aa289312011fac9f8c4553adba4af123a43f63e Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:01:24 +0100 Subject: [PATCH 30/40] Test on redesign branch --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d15ac9a..989cfd9 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,7 +2,7 @@ name: Pages on: push: - branches: [master] + branches: [master, redesign] workflow_dispatch: permissions: From cdfb7d2c36fc95600b6bab330c2bcc4892001686 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:08:43 +0100 Subject: [PATCH 31/40] Sort --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 15bd8f2..a4686f6 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,6 @@ source 'https://rubygems.org' +gem 'irb' gem 'jekyll' gem 'jekyll-avatar' gem 'jekyll-feed' @@ -8,4 +9,3 @@ gem 'mgem' gem 'rake' gem 'yard-coderay' gem 'yard-mruby' -gem 'irb' From 42bacc34f9963d382d1f48d7a8d018062520ba96 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:08:49 +0100 Subject: [PATCH 32/40] Bump bundler --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cffaa25..902a72d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -132,4 +132,4 @@ DEPENDENCIES yard-mruby BUNDLED WITH - 2.4.1 + 4.0.7 From 859c446b3281defb57792b5a211989a9fa82f03f Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:09:14 +0100 Subject: [PATCH 33/40] Remove unused scripts --- gen_mgemdata.rb | 26 ------------------ gen_mrbdoc.rb | 32 ---------------------- gen_releasedata.rb | 68 ---------------------------------------------- 3 files changed, 126 deletions(-) delete mode 100644 gen_mgemdata.rb delete mode 100644 gen_mrbdoc.rb delete mode 100644 gen_releasedata.rb diff --git a/gen_mgemdata.rb b/gen_mgemdata.rb deleted file mode 100644 index bd4d9bf..0000000 --- a/gen_mgemdata.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'mgem' -require 'yaml' - -include Mrbgem -mgems = load_gems - -mgems.update! - -mgem_info = [] -mgems.each do |mgem| - mgem_info << { - 'name' => mgem.name, - 'description' => mgem.description, - 'author' => mgem.author, - 'website' => mgem.website, - 'protocol' => mgem.protocol, - 'repository' => mgem.repository, - 'repooptions' => mgem.repooptions - } -end - -mgem_info.sort! { |a,b| a['name'].downcase <=> b['name'].downcase } - -File.open('_data/mgems.yml', 'w') do |f| - f.write(mgem_info.to_yaml) -end diff --git a/gen_mrbdoc.rb b/gen_mrbdoc.rb deleted file mode 100644 index a4d068f..0000000 --- a/gen_mrbdoc.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'git' - -Dir.mktmpdir do |tmp_mruby_src| - - Git.clone('https://github.com/mruby/mruby.git', 'mruby', :path => tmp_mruby_src) - - $: << "#{tmp_mruby_src}/mruby/doc/language/mrbdoc/lib" - - require 'mrbdoc_analyze' - require 'mrbdoc_docu' - - mrbdoc = MRBDoc.new - - mrbdoc.analyze_code "#{tmp_mruby_src}/mruby/" do |progress| - puts progress - end - - cfg = {:print_line_no => false} - mrbdoc.write_documentation 'docs/', cfg do |progress| - puts progress - end - - Dir.glob('docs/*.md') do |md_filename| - title = File.basename(md_filename, '.md') - File.open("#{md_filename}.tmp", 'w') do |md_file| - md_file << "---\nlayout: default\ntitle: #{title}\n---\n\n" - md_file << File.read(md_filename) - end - File.rename("#{md_filename}.tmp", md_filename) - end - -end diff --git a/gen_releasedata.rb b/gen_releasedata.rb deleted file mode 100644 index 0fa50f3..0000000 --- a/gen_releasedata.rb +++ /dev/null @@ -1,68 +0,0 @@ -# Regenerate _data/releases.yml from GitHub API. -# -# All pages derive the current stable release from the first non-prerelease -# entry in this file. Run this script after each new release or RC tag. -# -# Stable release dates are sourced from blog post filenames where available, -# falling back to the GitHub commit date for releases without a post. -# -# Usage: -# bundle exec ruby gen_releasedata.rb -# -# Requires a GitHub token via GH_TOKEN env var or `gh auth token`. - -require 'net/http' -require 'json' -require 'yaml' - -REPO = 'mruby/mruby' -DATA_FILE = File.join(__dir__, '_data', 'releases.yml') - -def gh_get(path) - uri = URI("https://api.github.com#{path}") - token = ENV['GH_TOKEN'] || `gh auth token 2>/dev/null`.strip - headers = { - 'Accept' => 'application/vnd.github.v3+json', - 'User-Agent' => 'mruby-site', - 'Authorization' => "Bearer #{token}" - } - Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - JSON.parse(http.get(uri.request_uri, headers).body) - end -end - -# Derive release dates from blog post filenames (format: YYYY-MM-DD-mruby-X.Y.Z-released.*) -post_dates = {} -Dir.glob(File.join(__dir__, '_posts', '*.{markdown,md}')).each do |f| - if (m = File.basename(f).match(/^(\d{4}-\d{2}-\d{2})-mruby-([\d.]+)-released/)) - post_dates[m[2]] = m[1] - end -end - -# Fetch all tags (paginated) -tags = [] -page = 1 -loop do - batch = gh_get("/repos/#{REPO}/tags?per_page=100&page=#{page}") - break if batch.empty? - tags.concat(batch) - break if batch.size < 100 - page += 1 -end - -# Keep all version-like tags (stable + rc/preview) -versioned = tags.select { |t| t['name'].match?(/^\d/) } - -releases = versioned.map do |tag| - version = tag['name'] - prerelease = !version.match?(/^\d+\.\d+\.\d+$/) - date = post_dates[version] || begin - commit = gh_get("/repos/#{REPO}/commits/#{tag['commit']['sha']}") - commit.dig('commit', 'committer', 'date')&.slice(0, 10) - end - $stdout.puts " #{version}: #{date}#{' (prerelease)' if prerelease}" - { 'version' => version, 'date' => date, 'prerelease' => prerelease } -end - -File.write(DATA_FILE, releases.to_yaml) -$stdout.puts "\nWritten #{releases.size} releases to #{DATA_FILE}" From 98d4b80543db794841efeb711b7232b78f7e2a95 Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:19:26 +0100 Subject: [PATCH 34/40] Cleanup --- Rakefile | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/Rakefile b/Rakefile index 99e5806..baf6db8 100644 --- a/Rakefile +++ b/Rakefile @@ -4,6 +4,7 @@ namespace :gen do require 'mgem' require 'yaml' + # mgem still uses old exists? method class File class << self alias_method :exists?, :exist? unless method_defined?(:exists?) @@ -28,45 +29,52 @@ namespace :gen do mgem_info.sort_by! { |g| g['name'].downcase } - File.open('_data/mgems.yml', 'w') { |f| f.write(mgem_info.to_yaml) } - puts 'Written _data/mgems.yml' + dest = File.join(__dir__, '_data', 'mgems.yml') + + File.write(dest, mgem_info.to_yaml) + puts "Written #{dest}" end desc 'Regenerate API documentation from mruby source (clones latest release into mruby/)' task :mrbdoc do require 'json' + require 'shellwords' # Resolve latest stable release tag via gh CLI (mruby uses tags, not GitHub Releases) - tags = JSON.parse(`gh api 'repos/mruby/mruby/tags?per_page=100'`) - tag = tags.map { |t| t['name'] }.find { |n| n.match?(/^\d+\.\d+\.\d+$/) } + tags = [] + page = 1 + loop do + batch = JSON.parse(`gh api "repos/mruby/mruby/tags?per_page=100&page=#{page}"`) + break if batch.empty? + tags.concat(batch) + break if batch.size < 100 + page += 1 + end + tag = tags.map { |t| t['name'] }.find { |n| n.match?(/^\d+\.\d+\.\d+$/) } raise "Could not determine latest stable mruby release tag" unless tag puts "Latest mruby release: #{tag}" # Clone mruby at the release tag (or skip if already at the right version) mruby_dir = File.join(__dir__, 'mruby') - if Dir.exist?(mruby_dir) - current_tag = `git -C #{mruby_dir} describe --exact-match HEAD 2>/dev/null`.strip - if current_tag == tag - puts "mruby #{tag} already cloned, skipping clone" - else - puts "mruby dir exists at #{current_tag.empty? ? 'unknown version' : current_tag}, re-cloning at #{tag}" - FileUtils.rm_rf(mruby_dir) - sh "git clone --depth 1 --branch #{tag} https://github.com/mruby/mruby.git #{mruby_dir}" - end + current_tag = Dir.exist?(mruby_dir) ? `git -C #{Shellwords.escape(mruby_dir)} describe --exact-match HEAD 2>/dev/null`.strip : nil + if current_tag == tag + puts "mruby #{tag} already cloned, skipping clone" else - sh "git clone --depth 1 --branch #{tag} https://github.com/mruby/mruby.git #{mruby_dir}" + puts current_tag ? "mruby dir exists at #{current_tag}, re-cloning at #{tag}" : "Cloning mruby #{tag}" + FileUtils.rm_rf(mruby_dir) + sh "git clone --depth 1 --branch #{Shellwords.escape(tag)} https://github.com/mruby/mruby.git #{Shellwords.escape(mruby_dir)}" end # Run mrbdoc (from yard-mruby) in the mruby directory — equivalent to doc:api Dir.chdir(mruby_dir) do - sh "BUNDLE_GEMFILE=#{__dir__}/Gemfile bundle exec mrbdoc" + sh "env BUNDLE_GEMFILE=#{Shellwords.escape(File.join(__dir__, 'Gemfile'))} bundle exec mrbdoc" end # Copy generated docs into our docs/api/ directory dest = File.join(__dir__, 'docs', 'api') FileUtils.mkdir_p(dest) FileUtils.cp_r(Dir.glob("#{mruby_dir}/doc/api/*"), dest) - puts "Copied mruby API docs to docs/api/" + puts "Copied mruby API docs to #{dest}" end desc 'Regenerate release data from GitHub API (_data/releases.yml)' From c035057ecdc8212f91bbf16e75554d6fe1d3c39f Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:23:14 +0100 Subject: [PATCH 35/40] Don't deploy on redesign --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 989cfd9..d15ac9a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,7 +2,7 @@ name: Pages on: push: - branches: [master, redesign] + branches: [master] workflow_dispatch: permissions: From 77f74aeeec49aa50a228418172eb0f21af2f826e Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:42:11 +0100 Subject: [PATCH 36/40] Only build on official repo --- .github/workflows/pages.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d15ac9a..8785c73 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -16,6 +16,7 @@ concurrency: jobs: build: + if: github.repository == 'mruby/mruby.github.io' runs-on: ubuntu-latest steps: - name: Checkout @@ -40,6 +41,7 @@ jobs: uses: actions/upload-pages-artifact@v3 deploy: + if: github.repository == 'mruby/mruby.github.io' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 032947c0d7378082d7131426d9350a754450e1ee Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:42:41 +0100 Subject: [PATCH 37/40] Generate contributors.yml --- Rakefile | 26 ++++- _data/contributors.yml | 217 +++++++++++++++++++++++++++++++++++++++++ team/index.html | 82 +--------------- 3 files changed, 246 insertions(+), 79 deletions(-) create mode 100644 _data/contributors.yml diff --git a/Rakefile b/Rakefile index baf6db8..44d36e3 100644 --- a/Rakefile +++ b/Rakefile @@ -77,6 +77,30 @@ namespace :gen do puts "Copied mruby API docs to #{dest}" end + desc 'Regenerate contributor list from mruby AUTHORS file (_data/contributors.yml)' + task :contributors do + require 'yaml' + + mruby_dir = File.join(__dir__, 'mruby') + raise "mruby/ not found — run gen:mrbdoc first" unless Dir.exist?(mruby_dir) + + threshold = (ENV['CONTRIBUTOR_THRESHOLD'] || '10').to_i + + # AUTHORS format: " COUNT Name (@login)[*+]" + contributors = File.readlines(File.join(mruby_dir, 'AUTHORS'), chomp: true) + .filter_map do |line| + m = line.match(/^\s*(\d+)\s+(.+?)\s+\(@([\w-]+)\)[*+]?\s*$/) + next unless m + count = m[1].to_i + next if count < threshold + { 'name' => m[2], 'login' => m[3], 'count' => count } + end + + dest = File.join(__dir__, '_data', 'contributors.yml') + File.write(dest, contributors.to_yaml) + puts "Written #{contributors.size} contributors (threshold: #{threshold} commits) to #{dest}" + end + desc 'Regenerate release data from GitHub API (_data/releases.yml)' task :releasedata do require 'json' @@ -124,7 +148,7 @@ namespace :gen do end desc 'Build the Jekyll site' -task build: %w[gen:mgemdata gen:mrbdoc gen:releasedata] do +task build: %w[gen:mgemdata gen:mrbdoc gen:contributors gen:releasedata] do sh 'bundle exec jekyll build' end diff --git a/_data/contributors.yml b/_data/contributors.yml new file mode 100644 index 0000000..f7d5c49 --- /dev/null +++ b/_data/contributors.yml @@ -0,0 +1,217 @@ +--- +- name: Yukihiro "Matz" Matsumoto + login: matz + count: 6083 +- name: dearblue + login: dearblue + count: 673 +- name: KOBAYASHI Shuji + login: shuujii + count: 587 +- name: Daniel Bovensiepen + login: bovi + count: 353 +- name: Takeshi Watanabe + login: take-cheeze + count: 345 +- name: Masaki Muranaka + login: monaka + count: 333 +- name: Jun Hiroe + login: suzukaze + count: 234 +- name: Tomoyuki Sahara + login: tsahara + count: 228 +- name: Cremno + login: cremno + count: 220 +- name: John Bampton + login: jbampton + count: 219 +- name: Yuki Kurihara + login: ksss + count: 209 +- name: Yasuhiro Matsumoto + login: mattn + count: 144 +- name: Carson McDonald + login: carsonmcdonald + count: 113 +- name: Tomasz Pędraszewski + login: dabroz + count: 104 +- name: Akira Yumiyama + login: akiray03 + count: 83 +- name: skandhas + login: skandhas + count: 83 +- name: Masamitsu MURASE + login: masamitsu-murase + count: 80 +- name: Tatsuhiko Kubo + login: cubicdaiya + count: 71 +- name: Yuichiro MASUI + login: masuidrive + count: 71 +- name: Hiroshi Mimaki + login: mimaki + count: 69 +- name: Yuichiro Kaneko + login: yui-knk + count: 62 +- name: Kurebayashi, Takahiro + login: crimsonwoods + count: 59 +- name: h2so5 + login: h2so5 + count: 56 +- name: Ralph Desir + login: Mav7 + count: 52 +- name: Paolo Bosetti + login: pbosetti + count: 48 +- name: Rory O'Connell + login: RoryO + count: 45 +- name: fleuria + login: flaneur2020 + count: 42 +- name: Christopher Aue + login: christopheraue + count: 40 +- name: Seba Gamboa + login: sagmor + count: 40 +- name: Kouhei Sutou + login: kou + count: 39 +- name: Masayoshi Takahashi + login: takahashim + count: 32 +- name: MATSUMOTO Ryosuke + login: matsumotory + count: 31 +- name: Nobuyoshi Nakada + login: nobu + count: 30 +- name: Hoshiumi Arata + login: hoshiumiarata + count: 26 +- name: Julian Aron Prenner + login: furunkel + count: 25 +- name: Clayton Smith + login: clayton-shopify + count: 22 +- name: Uchio Kondo + login: udzura + count: 22 +- name: Zachary Scott + login: zzak + count: 22 +- name: Ryan Lopopolo + login: lopopolo + count: 21 +- name: Ryan Scott + login: ryan-scott-dev + count: 20 +- name: Bouke van der Bijl + login: bouk + count: 19 +- name: Jared Breeden + login: jbreeden + count: 19 +- name: go kikuta + login: gkta + count: 19 +- name: Corey Powell + login: IceDragon200 + count: 18 +- name: Hidetaka Takano + login: TJ-Hidetaka-Takano + count: 18 +- name: Jon Maken + login: jonforums + count: 18 +- name: mirichi + login: mirichi + count: 18 +- name: Mitchell Blank Jr + login: mitchblank + count: 17 +- name: bggd + login: bggd + count: 16 +- name: kano4 + login: kano4 + count: 16 +- name: Felix Jones + login: felixjones + count: 15 +- name: Blaž Hrastnik + login: archseer + count: 14 +- name: Kazuki Tsujimoto + login: k-tsj + count: 14 +- name: Tadashi FUKUZAWA + login: FUKUZAWA-Tadashi + count: 14 +- name: fn ⌃ ⌥ + login: FnControlOption + count: 14 +- name: leviongit + login: leviongit + count: 14 +- name: Jose Narvaez + login: goyox86 + count: 13 +- name: Patrick Hogan + login: pbhogan + count: 13 +- name: Akira Kuroda + login: akuroda + count: 12 +- name: NAKAMURA Usaku + login: unak + count: 12 +- name: Ray Chason + login: chasonr + count: 12 +- name: Takashi Sawanaka + login: sdottaka + count: 12 +- name: Ukrainskiy Sergey + login: ukrainskiysergey + count: 12 +- name: Xuejie "Rafael" Xiao + login: xxuejie + count: 12 +- name: Julien Ammous + login: schmurfy + count: 11 +- name: Kazuho Oku + login: kazuho + count: 11 +- name: RIZAL Reckordp + login: Reckordp + count: 11 +- name: Seeker + login: SeekingMeaning + count: 11 +- name: takkaw + login: takkaw + count: 11 +- name: Miura Hideki + login: miura1729 + count: 10 +- name: Narihiro Nakamura + login: authorNari + count: 10 +- name: Yuichi Nishiwaki + login: nyuichi + count: 10 diff --git a/team/index.html b/team/index.html index 19ef01c..ea4c7b9 100644 --- a/team/index.html +++ b/team/index.html @@ -50,85 +50,11 @@

          mruby Developers

          — from the AUTHORS file
          - Yukihiro Matsumoto + {%- for contributor in site.data.contributors -%} + {{ contributor.name }} · - FUKUOKA CSK CORPORATION - · - Kyushu Institute of Technology - · - Network Applied Communication Laboratory, Inc. - · - Daniel Bovensiepen - · - Jon Maken - · - Bjorn De Meyer - · - Yuichiro MASUI - · - Masamitsu MURASE - · - Masaki Muranaka - · - Internet Initiative Japan Inc. - · - Tadashi FUKUZAWA - · - MATSUMOTO Ryosuke - · - Koji Yoshioka - · - Jun Hiroe - · - Narihiro Nakamura - · - Yuichi Nishiwaki - · - Tatsuhiko Kubo - · - Takeshi Watanabe - · - specified non-profit corporation mruby Forum - · - Kazuaki Tanaka - · - Hiromasa Ishii - · - Hiroshi Mimaki - · - Satoshi Odawara - · - Mitsubishi Electric Micro-Computer Application Software Co.,Ltd. - · - Ralph Desir - · - Hiroyuki Matsuzaki - · - Yuhei Okazaki - · - Manycolors, Inc. - · - Shota Nakano - · - Yuichi Osawa - · - Terence Lee - · - Zachary Scott - · - Tomasz Dąbrowski - · - Christopher Aue - · - Masahiro Wakame - · - YAMAMOTO Masaya - · - KOBAYASHI Shuji - · - John Bampton - · - + 100 more on GitHub → + {%- endfor -%} + 300+ contributors on GitHub →
          From a36e9c8db1e8d03e6aec7217aa9f910fe7d6b05d Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:53:37 +0100 Subject: [PATCH 38/40] Update README.md --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8e57c7f..f5c9fa9 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,79 @@ mruby.org ========= -This is the [Jekyll](https://jekyllrb.com/) source of -the [mruby.org](https://mruby.org/) website. +This is the [Jekyll](https://jekyllrb.com/) source of the [mruby.org](https://mruby.org/) website. -## Preview +## Prerequisites -The following will give you a preview of the site. +- **Ruby** — version is specified in `.ruby-version` +- **Bundler** — `gem install bundler` +- **`gh` CLI** — required by `gen:mrbdoc` and `gen:releasedata` to query the GitHub API -Install bundler: +## Local development ```shell -gem install bundler +git clone https://github.com/mruby/mruby.github.io +cd mruby.github.io +bundle install ``` -Clone the repository: +Serve the site locally with live reload: ```shell -git clone https://github.com/mruby/mruby.github.io +bundle exec rake serve +# or use the convenience script: +./server ``` -Install Jekyll and its dependencies: +## Build + +Runs all data generation tasks then builds the Jekyll site: ```shell -cd mruby.github.io -bundle install +bundle exec rake build ``` -Preview the site: +## Data generation tasks + +Each task can also be run individually: + +### `rake gen:mgemdata` + +Regenerates `_data/mgems.yml` from the mrbgems registry. Do not edit this file manually. + +```shell +bundle exec rake gen:mgemdata +``` + +### `rake gen:mrbdoc` + +Clones the latest stable mruby release into `mruby/`, generates YARD API documentation, and copies it to `docs/api/`. Requires the `gh` CLI. ```shell -bundle exec jekyll serve -open "http://localhost:4000" +bundle exec rake gen:mrbdoc ``` + +### `rake gen:contributors` + +Generates `_data/contributors.yml` from the mruby `AUTHORS` file. Requires `mruby/` to exist (run `gen:mrbdoc` first). The `CONTRIBUTOR_THRESHOLD` environment variable sets the minimum commit count (default: 10). + +```shell +bundle exec rake gen:contributors +CONTRIBUTOR_THRESHOLD=20 bundle exec rake gen:contributors +``` + +### `rake gen:releasedata` + +Generates `_data/releases.yml` from the GitHub API. Requires the `gh` CLI. + +```shell +bundle exec rake gen:releasedata +``` + +## Deployment + +GitHub Actions (`.github/workflows/pages.yml`) triggers on push to `master`. It runs `bundle exec rake build` (with `GH_TOKEN` set for the `gh` CLI calls) and deploys the result to GitHub Pages via `actions/deploy-pages`. + +## CI + +The lint workflow (`.github/workflows/lint.yml`) runs on all pull requests and checks for spelling errors (`misspell`) and merge conflict markers. From b28e57ef2f29cd5e532ded690f0cfa6b20e515da Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Thu, 5 Mar 2026 22:58:10 +0100 Subject: [PATCH 39/40] Add logo in the background --- _sass/_page-header.scss | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/_sass/_page-header.scss b/_sass/_page-header.scss index cebbe03..2fac2b5 100644 --- a/_sass/_page-header.scss +++ b/_sass/_page-header.scss @@ -10,6 +10,7 @@ background: var(--color-bg-warm); border-bottom: 1px solid var(--color-border); padding: 80px var(--container-padding) 56px; + overflow: hidden; /* --plain: no background, no border (downloads) */ &--plain { @@ -17,6 +18,12 @@ border-bottom: none; } + &--plain &__inner::after, + &--article &__inner::after, + &--split &__inner::after { + display: none; + } + /* --article: tighter top padding, used in post layout */ &--article { padding-top: 64px; @@ -38,6 +45,20 @@ .page-header__inner { max-width: var(--container-max-width); margin: 0 auto; + position: relative; + + &::after { + content: ''; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + width: 340px; + height: 340px; + background: url('/assets/images/mruby_logo_red_icon.png') no-repeat center / contain; + opacity: 0.07; + pointer-events: none; + } } /* Left column in split layouts (implicit — no special style needed) */ @@ -177,6 +198,10 @@ .page-header__aside { padding-bottom: 0; } + + .page-header__inner::after { + display: none; + } } /* ------------------------------------------------------------ From 6f7a93f349c4899ff43ace6266e6ae807ff8703c Mon Sep 17 00:00:00 2001 From: Piotr Usewicz Date: Mon, 13 Apr 2026 12:31:05 +0200 Subject: [PATCH 40/40] Add new releases --- _data/releases.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_data/releases.yml b/_data/releases.yml index 8bd0132..07bafbc 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -1,4 +1,13 @@ --- +- version: 4.0.0-rc4 + date: '2026-04-13' + prerelease: true +- version: 4.0.0-rc3 + date: '2026-04-02' + prerelease: true +- version: 4.0.0-rc2 + date: '2026-03-12' + prerelease: true - version: 4.0.0-rc date: '2026-03-05' prerelease: true