CINXE.COM

Ruby - Wikipedia Bahasa Melayu, ensiklopedia bebas

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="ms" dir="ltr"> <head> <meta charset="UTF-8"> <title>Ruby - Wikipedia Bahasa Melayu, ensiklopedia bebas</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )mswikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy" ,"wgMonthNames":["","Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],"wgRequestId":"82126b0e-1578-4a76-95f9-fa6c10a06e74","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Ruby","wgTitle":"Ruby","wgCurRevisionId":4476506,"wgRevisionId":4476506,"wgArticleId":42089,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Pages using deprecated source tags","Ruby"],"wgPageViewLanguage":"ms","wgPageContentLanguage":"ms","wgPageContentModel":"wikitext","wgRelevantPageName":"Ruby","wgRelevantArticleId":42089,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"ms","pageLanguageDir":"ltr" ,"pageVariantFallbacks":"ms"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":9000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q161053","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.charinsert-styles":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles": "ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.teahouse","ext.gadget.ReferenceTooltips","ext.gadget.watchlist-notice","ext.gadget.DRN-wizard","ext.gadget.charinsert","ext.gadget.refToolbar","ext.gadget.extra-toolbar-buttons","ext.gadget.MenuKedaiKopi","ext.gadget.mySandbox","ext.gadget.AdvancedSiteNotices","ext.gadget.switcher","ext.gadget.featured-articles-links","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=ms&amp;modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=ms&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=ms&amp;modules=ext.gadget.charinsert-styles&amp;only=styles&amp;skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=ms&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Ruby - Wikipedia Bahasa Melayu, ensiklopedia bebas"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//ms.m.wikipedia.org/wiki/Ruby"> <link rel="alternate" type="application/x-wiki" title="Sunting" href="/w/index.php?title=Ruby&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (ms)"> <link rel="EditURI" type="application/rsd+xml" href="//ms.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://ms.wikipedia.org/wiki/Ruby"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ms"> <link rel="alternate" type="application/atom+xml" title="Suapan Atom Wikipedia" href="/w/index.php?title=Khas:Perubahan_terkini&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Ruby rootpage-Ruby skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Pergi ke kandungan</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Tapak"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Menu utama" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Menu utama</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Menu utama</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">alih ke bar sisi</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">sorokkan</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Pandu arah </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-Laman-Utama" class="mw-list-item"><a href="/wiki/Laman_Utama"><span>Laman Utama</span></a></li><li id="n-Tinjau" class="mw-list-item"><a href="/wiki/Wikipedia:Tinjau"><span>Tinjau</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Hal_semasa" title="Cari maklumat latar belakang mengenai peristiwa semasa"><span>Hal semasa</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Khas:Rawak" title="Muat laman rawak [x]" accesskey="x"><span>Rencana rawak</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Perhubungan </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-Tentang-Wikipedia" class="mw-list-item"><a href="/wiki/Wikipedia:Perihal"><span>Tentang Wikipedia</span></a></li><li id="n-Gerbang-komuniti" class="mw-list-item"><a href="/wiki/Wikipedia:Gerbang_Komuniti"><span>Gerbang komuniti</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Khas:Perubahan_terkini" title="Senarai perubahan terkini dalam wiki [r]" accesskey="r"><span>Perubahan terkini</span></a></li><li id="n-Hubungi-kami" class="mw-list-item"><a href="/wiki/Wikipedia:Hubungi_kami"><span>Hubungi kami</span></a></li><li id="n-Menderma" class="mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_ms.wikipedia.org&amp;uselang=ms"><span>Menderma</span></a></li><li id="n-help" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" title="Tempat mencari jawapan"><span>Bantuan</span></a></li><li id="n-Kedai-Kopi" class="mw-list-item"><a href="/wiki/Wikipedia:Kedai_Kopi"><span>Kedai Kopi</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Laman_Utama" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="Ensiklopedia Bebas" src="/static/images/mobile/copyright/wikipedia-tagline-ms.svg" width="120" height="13" style="width: 7.5em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Khas:Cari" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Cari di wiki ini [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Cari</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Cari Wikipedia" aria-label="Cari Wikipedia" autocapitalize="sentences" title="Cari di wiki ini [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Khas:Cari"> </div> <button class="cdx-button cdx-search-input__end-button">Cari</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Alat peribadi"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Penampilan"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Tukar penampilan saiz, lebar dan warna fon laman" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Penampilan" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Penampilan</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_ms.wikipedia.org&amp;uselang=ms" class=""><span>Derma</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Khas:Buka_akaun&amp;returnto=Ruby" title="Anda digalakkan untuk membuka akaun dan melog masuk; walau bagaimanapun, ianya tidak wajib" class=""><span>Buka akaun</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Khas:Log_masuk&amp;returnto=Ruby" title="Anda digalakkan untuk melog masuk; walau bagaimanapun, ia tidak wajib. [o]" accesskey="o" class=""><span>Log masuk</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Lebih pilihan" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Alat peribadi" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Alat peribadi</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menu pengguna" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_ms.wikipedia.org&amp;uselang=ms"><span>Derma</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Khas:Buka_akaun&amp;returnto=Ruby" title="Anda digalakkan untuk membuka akaun dan melog masuk; walau bagaimanapun, ianya tidak wajib"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Buka akaun</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Khas:Log_masuk&amp;returnto=Ruby" title="Anda digalakkan untuk melog masuk; walau bagaimanapun, ia tidak wajib. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log masuk</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Laman untuk penyunting log keluar <a href="/wiki/Bantuan:Pengenalan" aria-label="Ketahui lebih lanjut tentang menyunting"><span>Ketahui lebih lanjut</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Khas:Sumbangan_saya" title="Senarai suntingan yang dibuat daripada alamat IP ini [y]" accesskey="y"><span>Sumbangan</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Khas:Perbincangan_saya" title="Perbincangan mengenai penyuntingan daripada alamat IP anda [n]" accesskey="n"><span>Perbincangan</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Tapak"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Kandungan" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Kandungan</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">alih ke bar sisi</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">sorokkan</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Permulaan</div> </a> </li> <li id="toc-Sejarah" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Sejarah"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Sejarah</span> </div> </a> <ul id="toc-Sejarah-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Falsafah" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Falsafah"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Falsafah</span> </div> </a> <ul id="toc-Falsafah-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Semantik" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Semantik"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Semantik</span> </div> </a> <ul id="toc-Semantik-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Ciri-ciri" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Ciri-ciri"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Ciri-ciri</span> </div> </a> <button aria-controls="toc-Ciri-ciri-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Togol subbahagian Ciri-ciri</span> </button> <ul id="toc-Ciri-ciri-sublist" class="vector-toc-list"> <li id="toc-Interaksi" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Interaksi"> <div class="vector-toc-text"> <span class="vector-toc-numb">4.1</span> <span>Interaksi</span> </div> </a> <ul id="toc-Interaksi-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Kritikan" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Kritikan"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Kritikan</span> </div> </a> <ul id="toc-Kritikan-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Sintaks" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Sintaks"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Sintaks</span> </div> </a> <ul id="toc-Sintaks-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Contoh" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Contoh"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Contoh</span> </div> </a> <button aria-controls="toc-Contoh-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Togol subbahagian Contoh</span> </button> <ul id="toc-Contoh-sublist" class="vector-toc-list"> <li id="toc-Kelas" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Kelas"> <div class="vector-toc-text"> <span class="vector-toc-numb">7.1</span> <span>Kelas</span> </div> </a> <ul id="toc-Kelas-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Rujukan" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Rujukan"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Rujukan</span> </div> </a> <ul id="toc-Rujukan-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pautan_luar" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Pautan_luar"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Pautan luar</span> </div> </a> <ul id="toc-Pautan_luar-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Kandungan" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Togol isi kandungan" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Togol isi kandungan</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Ruby</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Pergi ke rencana dalam bahasa lain. Tersedia dalam 74 bahasa" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-74" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">74 bahasa</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%B1%D9%88%D8%A8%D9%8A_(%D9%84%D8%BA%D8%A9_%D8%A8%D8%B1%D9%85%D8%AC%D8%A9)" title="روبي (لغة برمجة) – Arab" lang="ar" hreflang="ar" data-title="روبي (لغة برمجة)" data-language-autonym="العربية" data-language-local-name="Arab" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-an mw-list-item"><a href="https://an.wikipedia.org/wiki/Luengache_de_programaci%C3%B3n_Ruby" title="Luengache de programación Ruby – Aragon" lang="an" hreflang="an" data-title="Luengache de programación Ruby" data-language-autonym="Aragonés" data-language-local-name="Aragon" class="interlanguage-link-target"><span>Aragonés</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/Ruby" title="Ruby – Asturia" lang="ast" hreflang="ast" data-title="Ruby" data-language-autonym="Asturianu" data-language-local-name="Asturia" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Ruby" title="Ruby – Azerbaijan" lang="az" hreflang="az" data-title="Ruby" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijan" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-azb mw-list-item"><a href="https://azb.wikipedia.org/wiki/%D8%B1%D9%88%D8%A8%DB%8C" title="روبی – South Azerbaijani" lang="azb" hreflang="azb" data-title="روبی" data-language-autonym="تۆرکجه" data-language-local-name="South Azerbaijani" class="interlanguage-link-target"><span>تۆرکجه</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Ruby_(bahasa_pemrograman)" title="Ruby (bahasa pemrograman) – Indonesia" lang="id" hreflang="id" data-title="Ruby (bahasa pemrograman)" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesia" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%B0%E0%A7%81%E0%A6%AC%E0%A6%BF_(%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A7%8B%E0%A6%97%E0%A7%8D%E0%A6%B0%E0%A6%BE%E0%A6%AE%E0%A6%BF%E0%A6%82_%E0%A6%AD%E0%A6%BE%E0%A6%B7%E0%A6%BE)" title="রুবি (প্রোগ্রামিং ভাষা) – Benggali" lang="bn" hreflang="bn" data-title="রুবি (প্রোগ্রামিং ভাষা)" data-language-autonym="বাংলা" data-language-local-name="Benggali" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/Ruby" title="Ruby – Belarus" lang="be" hreflang="be" data-title="Ruby" data-language-autonym="Беларуская" data-language-local-name="Belarus" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Ruby_(programski_jezik)" title="Ruby (programski jezik) – Bosnia" lang="bs" hreflang="bs" data-title="Ruby (programski jezik)" data-language-autonym="Bosanski" data-language-local-name="Bosnia" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/Ruby" title="Ruby – Bulgaria" lang="bg" hreflang="bg" data-title="Ruby" data-language-autonym="Български" data-language-local-name="Bulgaria" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Ruby" title="Ruby – Catalonia" lang="ca" hreflang="ca" data-title="Ruby" data-language-autonym="Català" data-language-local-name="Catalonia" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Ruby" title="Ruby – Czech" lang="cs" hreflang="cs" data-title="Ruby" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Ruby_(programmeringssprog)" title="Ruby (programmeringssprog) – Denmark" lang="da" hreflang="da" data-title="Ruby (programmeringssprog)" data-language-autonym="Dansk" data-language-local-name="Denmark" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Ruby_(Programmiersprache)" title="Ruby (Programmiersprache) – Jerman" lang="de" hreflang="de" data-title="Ruby (Programmiersprache)" data-language-autonym="Deutsch" data-language-local-name="Jerman" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Ruby_(programmeerimiskeel)" title="Ruby (programmeerimiskeel) – Estonia" lang="et" hreflang="et" data-title="Ruby (programmeerimiskeel)" data-language-autonym="Eesti" data-language-local-name="Estonia" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/Ruby" title="Ruby – Greek" lang="el" hreflang="el" data-title="Ruby" data-language-autonym="Ελληνικά" data-language-local-name="Greek" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Ruby_(programming_language)" title="Ruby (programming language) – Inggeris" lang="en" hreflang="en" data-title="Ruby (programming language)" data-language-autonym="English" data-language-local-name="Inggeris" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Ruby" title="Ruby – Sepanyol" lang="es" hreflang="es" data-title="Ruby" data-language-autonym="Español" data-language-local-name="Sepanyol" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Ruby_(programlingvo)" title="Ruby (programlingvo) – Esperanto" lang="eo" hreflang="eo" data-title="Ruby (programlingvo)" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Ruby" title="Ruby – Basque" lang="eu" hreflang="eu" data-title="Ruby" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%B1%D9%88%D8%A8%DB%8C_(%D8%B2%D8%A8%D8%A7%D9%86_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C)" title="روبی (زبان برنامه‌نویسی) – Parsi" lang="fa" hreflang="fa" data-title="روبی (زبان برنامه‌نویسی)" data-language-autonym="فارسی" data-language-local-name="Parsi" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Ruby" title="Ruby – Perancis" lang="fr" hreflang="fr" data-title="Ruby" data-language-autonym="Français" data-language-local-name="Perancis" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Ruby" title="Ruby – Galicia" lang="gl" hreflang="gl" data-title="Ruby" data-language-autonym="Galego" data-language-local-name="Galicia" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%A3%A8%EB%B9%84_(%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D_%EC%96%B8%EC%96%B4)" title="루비 (프로그래밍 언어) – Korea" lang="ko" hreflang="ko" data-title="루비 (프로그래밍 언어)" data-language-autonym="한국어" data-language-local-name="Korea" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ha mw-list-item"><a href="https://ha.wikipedia.org/wiki/Ruby_(programming_language)" title="Ruby (programming language) – Hausa" lang="ha" hreflang="ha" data-title="Ruby (programming language)" data-language-autonym="Hausa" data-language-local-name="Hausa" class="interlanguage-link-target"><span>Hausa</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/Ruby_(%D5%AE%D6%80%D5%A1%D5%A3%D6%80%D5%A1%D5%BE%D5%B8%D6%80%D5%B4%D5%A1%D5%B6_%D5%AC%D5%A5%D5%A6%D5%B8%D6%82)" title="Ruby (ծրագրավորման լեզու) – Armenia" lang="hy" hreflang="hy" data-title="Ruby (ծրագրավորման լեզու)" data-language-autonym="Հայերեն" data-language-local-name="Armenia" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Ruby_(programski_jezik)" title="Ruby (programski jezik) – Croatia" lang="hr" hreflang="hr" data-title="Ruby (programski jezik)" data-language-autonym="Hrvatski" data-language-local-name="Croatia" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/Ruby_(programifo-linguo)" title="Ruby (programifo-linguo) – Ido" lang="io" hreflang="io" data-title="Ruby (programifo-linguo)" data-language-autonym="Ido" data-language-local-name="Ido" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-ia mw-list-item"><a href="https://ia.wikipedia.org/wiki/Ruby_(linguage_de_programmation)" title="Ruby (linguage de programmation) – Interlingua" lang="ia" hreflang="ia" data-title="Ruby (linguage de programmation)" data-language-autonym="Interlingua" data-language-local-name="Interlingua" class="interlanguage-link-target"><span>Interlingua</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Ruby_(linguaggio_di_programmazione)" title="Ruby (linguaggio di programmazione) – Itali" lang="it" hreflang="it" data-title="Ruby (linguaggio di programmazione)" data-language-autonym="Italiano" data-language-local-name="Itali" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/Ruby" title="Ruby – Ibrani" lang="he" hreflang="he" data-title="Ruby" data-language-autonym="עברית" data-language-local-name="Ibrani" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/%E1%83%A0%E1%83%A3%E1%83%91%E1%83%98" title="რუბი – Georgia" lang="ka" hreflang="ka" data-title="რუბი" data-language-autonym="ქართული" data-language-local-name="Georgia" class="interlanguage-link-target"><span>ქართული</span></a></li><li class="interlanguage-link interwiki-ky mw-list-item"><a href="https://ky.wikipedia.org/wiki/Ruby" title="Ruby – Kirghiz" lang="ky" hreflang="ky" data-title="Ruby" data-language-autonym="Кыргызча" data-language-local-name="Kirghiz" class="interlanguage-link-target"><span>Кыргызча</span></a></li><li class="interlanguage-link interwiki-sw mw-list-item"><a href="https://sw.wikipedia.org/wiki/Ruby" title="Ruby – Swahili" lang="sw" hreflang="sw" data-title="Ruby" data-language-autonym="Kiswahili" data-language-local-name="Swahili" class="interlanguage-link-target"><span>Kiswahili</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Ruby" title="Ruby – Latvia" lang="lv" hreflang="lv" data-title="Ruby" data-language-autonym="Latviešu" data-language-local-name="Latvia" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Ruby" title="Ruby – Lithuania" lang="lt" hreflang="lt" data-title="Ruby" data-language-autonym="Lietuvių" data-language-local-name="Lithuania" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lmo mw-list-item"><a href="https://lmo.wikipedia.org/wiki/Ruby" title="Ruby – Lombard" lang="lmo" hreflang="lmo" data-title="Ruby" data-language-autonym="Lombard" data-language-local-name="Lombard" class="interlanguage-link-target"><span>Lombard</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Ruby_(programoz%C3%A1si_nyelv)" title="Ruby (programozási nyelv) – Hungary" lang="hu" hreflang="hu" data-title="Ruby (programozási nyelv)" data-language-autonym="Magyar" data-language-local-name="Hungary" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%B1%E0%B5%82%E0%B4%AC%E0%B4%BF_(%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%97%E0%B5%8D%E0%B4%B0%E0%B4%BE%E0%B4%AE%E0%B4%BF%E0%B4%99%E0%B5%8D_%E0%B4%AD%E0%B4%BE%E0%B4%B7)" title="റൂബി (പ്രോഗ്രാമിങ് ഭാഷ) – Malayalam" lang="ml" hreflang="ml" data-title="റൂബി (പ്രോഗ്രാമിങ് ഭാഷ)" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%B0%E0%A5%81%E0%A4%AC%E0%A5%80" title="रुबी – Marathi" lang="mr" hreflang="mr" data-title="रुबी" data-language-autonym="मराठी" data-language-local-name="Marathi" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikipedia.org/wiki/Ruby_(programming_language)" title="Ruby (programming language) – Burma" lang="my" hreflang="my" data-title="Ruby (programming language)" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="Burma" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Ruby_(programmeertaal)" title="Ruby (programmeertaal) – Belanda" lang="nl" hreflang="nl" data-title="Ruby (programmeertaal)" data-language-autonym="Nederlands" data-language-local-name="Belanda" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/Ruby" title="Ruby – Jepun" lang="ja" hreflang="ja" data-title="Ruby" data-language-autonym="日本語" data-language-local-name="Jepun" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Ruby" title="Ruby – Bokmal Norway" lang="nb" hreflang="nb" data-title="Ruby" data-language-autonym="Norsk bokmål" data-language-local-name="Bokmal Norway" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/Ruby" title="Ruby – Nynorsk Norway" lang="nn" hreflang="nn" data-title="Ruby" data-language-autonym="Norsk nynorsk" data-language-local-name="Nynorsk Norway" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikipedia.org/wiki/%E0%AC%B0%E0%AD%81%E0%AC%AC%E0%AD%80_(%E0%AC%AA%E0%AD%8D%E0%AC%B0%E0%AD%8B%E0%AC%97%E0%AD%8D%E0%AC%B0%E0%AC%BE%E0%AC%AE%E0%AC%BF%E0%AC%82_%E0%AC%AD%E0%AC%BE%E0%AC%B7%E0%AC%BE)" title="ରୁବୀ (ପ୍ରୋଗ୍ରାମିଂ ଭାଷା) – Odia" lang="or" hreflang="or" data-title="ରୁବୀ (ପ୍ରୋଗ୍ରାମିଂ ଭାଷା)" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="Odia" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-uz mw-list-item"><a href="https://uz.wikipedia.org/wiki/Ruby" title="Ruby – Uzbekistan" lang="uz" hreflang="uz" data-title="Ruby" data-language-autonym="Oʻzbekcha / ўзбекча" data-language-local-name="Uzbekistan" class="interlanguage-link-target"><span>Oʻzbekcha / ўзбекча</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%B0%E0%A9%82%E0%A8%AC%E0%A9%80_(%E0%A8%AA%E0%A9%8D%E0%A8%B0%E0%A9%8B%E0%A8%97%E0%A8%B0%E0%A8%BE%E0%A8%AE%E0%A8%BF%E0%A9%B0%E0%A8%97_%E0%A8%AD%E0%A8%BE%E0%A8%B8%E0%A8%BC%E0%A8%BE)" title="ਰੂਬੀ (ਪ੍ਰੋਗਰਾਮਿੰਗ ਭਾਸ਼ਾ) – Punjabi" lang="pa" hreflang="pa" data-title="ਰੂਬੀ (ਪ੍ਰੋਗਰਾਮਿੰਗ ਭਾਸ਼ਾ)" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="Punjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pnb mw-list-item"><a href="https://pnb.wikipedia.org/wiki/%D8%B1%D9%88%D8%A8%DB%8C_(%D9%BE%D8%B1%D9%88%DA%AF%D8%B1%D8%A7%D9%85%D9%86%DA%AF_%D8%B2%D8%A8%D8%A7%D9%86)" title="روبی (پروگرامنگ زبان) – Western Punjabi" lang="pnb" hreflang="pnb" data-title="روبی (پروگرامنگ زبان)" data-language-autonym="پنجابی" data-language-local-name="Western Punjabi" class="interlanguage-link-target"><span>پنجابی</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Ruby_(j%C4%99zyk_programowania)" title="Ruby (język programowania) – Poland" lang="pl" hreflang="pl" data-title="Ruby (język programowania)" data-language-autonym="Polski" data-language-local-name="Poland" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Ruby_(linguagem_de_programa%C3%A7%C3%A3o)" title="Ruby (linguagem de programação) – Portugis" lang="pt" hreflang="pt" data-title="Ruby (linguagem de programação)" data-language-autonym="Português" data-language-local-name="Portugis" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Ruby" title="Ruby – Romania" lang="ro" hreflang="ro" data-title="Ruby" data-language-autonym="Română" data-language-local-name="Romania" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/Ruby" title="Ruby – Rusia" lang="ru" hreflang="ru" data-title="Ruby" data-language-autonym="Русский" data-language-local-name="Rusia" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Ruby_(gjuh%C3%AB_programuese)" title="Ruby (gjuhë programuese) – Albania" lang="sq" hreflang="sq" data-title="Ruby (gjuhë programuese)" data-language-autonym="Shqip" data-language-local-name="Albania" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Ruby_(programming_language)" title="Ruby (programming language) – Simple English" lang="en-simple" hreflang="en-simple" data-title="Ruby (programming language)" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Ruby_(programovac%C3%AD_jazyk)" title="Ruby (programovací jazyk) – Slovak" lang="sk" hreflang="sk" data-title="Ruby (programovací jazyk)" data-language-autonym="Slovenčina" data-language-local-name="Slovak" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%DA%95%D9%88%D9%88%D8%A8%DB%8C" title="ڕووبی – Kurdi Tengah" lang="ckb" hreflang="ckb" data-title="ڕووبی" data-language-autonym="کوردی" data-language-local-name="Kurdi Tengah" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Ruby_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D1%81%D0%BA%D0%B8_%D1%98%D0%B5%D0%B7%D0%B8%D0%BA)" title="Ruby (програмски језик) – Serbia" lang="sr" hreflang="sr" data-title="Ruby (програмски језик)" data-language-autonym="Српски / srpski" data-language-local-name="Serbia" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Rubi_(programski_jezik)" title="Rubi (programski jezik) – SerboCroatia" lang="sh" hreflang="sh" data-title="Rubi (programski jezik)" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="SerboCroatia" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Ruby" title="Ruby – Finland" lang="fi" hreflang="fi" data-title="Ruby" data-language-autonym="Suomi" data-language-local-name="Finland" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Ruby" title="Ruby – Sweden" lang="sv" hreflang="sv" data-title="Ruby" data-language-autonym="Svenska" data-language-local-name="Sweden" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%B0%E0%AF%82%E0%AE%AA%E0%AE%BF_(%E0%AE%A8%E0%AE%BF%E0%AE%B0%E0%AE%B2%E0%AE%BE%E0%AE%95%E0%AF%8D%E0%AE%95_%E0%AE%AE%E0%AF%8A%E0%AE%B4%E0%AE%BF)" title="ரூபி (நிரலாக்க மொழி) – Tamil" lang="ta" hreflang="ta" data-title="ரூபி (நிரலாக்க மொழி)" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-tt mw-list-item"><a href="https://tt.wikipedia.org/wiki/Ruby_(%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B0_%D1%82%D3%99%D1%8D%D0%BC%D0%B8%D0%BD%D0%B0%D1%82%D1%8B%D0%BD_%D1%82%D0%B0%D1%81%D0%B2%D0%B8%D1%80%D0%BB%D0%B0%D1%83_%D1%82%D0%B5%D0%BB%D0%B5)" title="Ruby (программа тәэминатын тасвирлау теле) – Tatar" lang="tt" hreflang="tt" data-title="Ruby (программа тәэминатын тасвирлау теле)" data-language-autonym="Татарча / tatarça" data-language-local-name="Tatar" class="interlanguage-link-target"><span>Татарча / tatarça</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikipedia.org/wiki/%E0%B0%B0%E0%B1%82%E0%B0%AC%E0%B0%BF_(%E0%B0%95%E0%B0%82%E0%B0%AA%E0%B1%8D%E0%B0%AF%E0%B1%82%E0%B0%9F%E0%B0%B0%E0%B1%8D_%E0%B0%AD%E0%B0%BE%E0%B0%B7)" title="రూబి (కంప్యూటర్ భాష) – Telugu" lang="te" hreflang="te" data-title="రూబి (కంప్యూటర్ భాష)" data-language-autonym="తెలుగు" data-language-local-name="Telugu" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B8%A3%E0%B8%B9%E0%B8%9A%E0%B8%B5" title="ภาษารูบี – Thai" lang="th" hreflang="th" data-title="ภาษารูบี" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Ruby_(ng%C3%B4n_ng%E1%BB%AF_l%E1%BA%ADp_tr%C3%ACnh)" title="Ruby (ngôn ngữ lập trình) – Vietnam" lang="vi" hreflang="vi" data-title="Ruby (ngôn ngữ lập trình)" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnam" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-tg mw-list-item"><a href="https://tg.wikipedia.org/wiki/Ruby" title="Ruby – Tajik" lang="tg" hreflang="tg" data-title="Ruby" data-language-autonym="Тоҷикӣ" data-language-local-name="Tajik" class="interlanguage-link-target"><span>Тоҷикӣ</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Ruby" title="Ruby – Turki" lang="tr" hreflang="tr" data-title="Ruby" data-language-autonym="Türkçe" data-language-local-name="Turki" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/Ruby" title="Ruby – Ukraine" lang="uk" hreflang="uk" data-title="Ruby" data-language-autonym="Українська" data-language-local-name="Ukraine" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%B1%D9%88%D8%A8%DB%8C_(%D9%BE%D8%B1%D9%88%DA%AF%D8%B1%D8%A7%D9%85%D9%86%DA%AF_%D8%B2%D8%A8%D8%A7%D9%86)" title="روبی (پروگرامنگ زبان) – Urdu" lang="ur" hreflang="ur" data-title="روبی (پروگرامنگ زبان)" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/Ruby" title="Ruby – Cina Wu" lang="wuu" hreflang="wuu" data-title="Ruby" data-language-autonym="吴语" data-language-local-name="Cina Wu" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/Ruby_%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80" title="Ruby 程式語言 – Kantonis" lang="yue" hreflang="yue" data-title="Ruby 程式語言" data-language-autonym="粵語" data-language-local-name="Kantonis" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-bat-smg mw-list-item"><a href="https://bat-smg.wikipedia.org/wiki/Ruby" title="Ruby – Samogitian" lang="sgs" hreflang="sgs" data-title="Ruby" data-language-autonym="Žemaitėška" data-language-local-name="Samogitian" class="interlanguage-link-target"><span>Žemaitėška</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/Ruby" title="Ruby – Cina" lang="zh" hreflang="zh" data-title="Ruby" data-language-autonym="中文" data-language-local-name="Cina" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q161053#sitelinks-wikipedia" title="Sunting pautan antara bahasa" class="wbc-editpage">Sunting pautan</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Ruang nama"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Ruby" title="Lihat laman kandungan [c]" accesskey="c"><span>Rencana</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Perbincangan:Ruby" rel="discussion" title="Perbincangan mengenai laman kandungan [t]" accesskey="t"><span>Perbincangan</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Tukar kelainan bahasa" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Bahasa Melayu</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Rupa"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Ruby"><span>Baca</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Ruby&amp;veaction=edit" title="Sunting laman ini [v]" accesskey="v"><span>Sunting</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Ruby&amp;action=edit" title="Sunting kod sumber untuk laman ini [e]" accesskey="e"><span>Sunting sumber</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Ruby&amp;action=history" title="Semakan terdahulu bagi laman ini [h]" accesskey="h"><span>Lihat sejarah</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Alatan laman"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Peralatan" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Peralatan</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Peralatan</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">alih ke bar sisi</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">sorokkan</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Lagi pilihan" > <div class="vector-menu-heading"> Tindakan </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Ruby"><span>Baca</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Ruby&amp;veaction=edit" title="Sunting laman ini [v]" accesskey="v"><span>Sunting</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Ruby&amp;action=edit" title="Sunting kod sumber untuk laman ini [e]" accesskey="e"><span>Sunting sumber</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Ruby&amp;action=history"><span>Lihat sejarah</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Umum </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Khas:Pautan_ke_sini/Ruby" title="Senarai semua laman wiki yang mengandungi pautan ke laman ini [j]" accesskey="j"><span>Pautan ke laman ini</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Khas:Perubahan_berkaitan/Ruby" rel="nofollow" title="Perubahan terkini bagi laman yang dipaut dari laman ini [k]" accesskey="k"><span>Perubahan berkaitan</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ms" title="Muat naik fail [u]" accesskey="u"><span>Muat naik fail</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Khas:Laman_khas" title="Senarai semua laman khas [q]" accesskey="q"><span>Laman khas</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Ruby&amp;oldid=4476506" title="Pautan kekal ke semakan laman ini"><span>Pautan kekal</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Ruby&amp;action=info" title="Maklumat lanjut mengenai laman ini"><span>Maklumat laman</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Khas:Petik_laman_ini&amp;page=Ruby&amp;id=4476506&amp;wpFormIdentifier=titleform" title="Maklumat tentang cara memetik laman ini"><span>Petik laman ini</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Khas:UrlShortener&amp;url=https%3A%2F%2Fms.wikipedia.org%2Fwiki%2FRuby"><span>Dapatkan URL pendek</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Khas:QrCode&amp;url=https%3A%2F%2Fms.wikipedia.org%2Fwiki%2FRuby"><span>Muat turun kod QR</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Cetak/eksport </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Khas:Buku&amp;bookcmd=book_creator&amp;referer=Ruby"><span>Cipta buku</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Khas:DownloadAsPdf&amp;page=Ruby&amp;action=show-download-screen"><span>Muat turun sebagai PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Ruby&amp;printable=yes" title="Versi boleh cetak bagi laman ini [p]" accesskey="p"><span>Versi boleh cetak</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> Dalam projek lain </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Ruby_programming_language" hreflang="en"><span>Wikimedia Commons</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q161053" title="Pautan ke item repositori data yang bersambung [g]" accesskey="g"><span>Butir Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Alatan laman"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Penampilan"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Penampilan</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">alih ke bar sisi</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">sorokkan</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">Daripada Wikipedia, ensiklopedia bebas.</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="ms" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r5657302">.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}body.skin-minerva .mw-parser-output .infobox-header,body.skin-minerva .mw-parser-output .infobox-subheader,body.skin-minerva .mw-parser-output .infobox-above,body.skin-minerva .mw-parser-output .infobox-title,body.skin-minerva .mw-parser-output .infobox-image,body.skin-minerva .mw-parser-output .infobox-full-data,body.skin-minerva .mw-parser-output .infobox-below{text-align:center}</style><table class="infobox vevent"><caption class="infobox-title summary">Ruby</caption><tbody><tr><td colspan="2" class="infobox-image"><span typeof="mw:File"><a href="/wiki/Fail:Ruby_logo.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Ruby_logo.png/100px-Ruby_logo.png" decoding="async" width="100" height="100" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Ruby_logo.png/150px-Ruby_logo.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Ruby_logo.png/200px-Ruby_logo.png 2x" data-file-width="995" data-file-height="996" /></a></span></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Paradigma_pengaturcaraan" title="Paradigma pengaturcaraan">Paradigma</a></th><td class="infobox-data"><a href="/wiki/Bahasa_pengaturcaraan_berbilang_paradigma" class="mw-redirect" title="Bahasa pengaturcaraan berbilang paradigma">berbilang paradigma</a> (kefungsian, imperatif, logik, berorientasi objek (berasaskan kelas))</td></tr><tr><th scope="row" class="infobox-label">Muncul pada</th><td class="infobox-data"><a href="/wiki/1995" title="1995">1995</a></td></tr><tr><th scope="row" class="infobox-label">Direka oleh</th><td class="infobox-data organiser"><a href="/wiki/Yukihiro_Matsumoto" title="Yukihiro Matsumoto">Yukihiro Matsumoto</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Pembangun_perisian" title="Pembangun perisian">Pembangun</a></th><td class="infobox-data">Yukihiro Matsumoto (antara lain)</td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Kitar_hidup_lepasan_perisian" class="mw-redirect" title="Kitar hidup lepasan perisian">Lepasan stabil</a></th><td class="infobox-data">1.9.0 (<a href="/wiki/25_Disember" title="25 Disember">25 Disember</a> <a href="/wiki/2007" title="2007">2007</a>)</td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Sistem_jenis" title="Sistem jenis">Disiplin penjenisan</a></th><td class="infobox-data"><a href="/wiki/Sistem_jenis" title="Sistem jenis">dinamik</a> (<a href="/wiki/Penjenisan_itik" title="Penjenisan itik">"itik"</a>)</td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Pelaksanaan_bahasa_pengaturcaraan" title="Pelaksanaan bahasa pengaturcaraan">Pelaksanaan utama</a></th><td class="infobox-data">Ruby, <a href="/w/index.php?title=JRuby&amp;action=edit&amp;redlink=1" class="new" title="JRuby (laman tidak wujud)">JRuby</a></td></tr><tr><th scope="row" class="infobox-label">Dipengaruhi</th><td class="infobox-data"><a href="/w/index.php?title=Smalltalk&amp;action=edit&amp;redlink=1" class="new" title="Smalltalk (laman tidak wujud)">Smalltalk</a>, <a href="/wiki/Perl" title="Perl">Perl</a>, <a href="/wiki/LISP" title="LISP">LISP</a>, <a href="/w/index.php?title=Scheme&amp;action=edit&amp;redlink=1" class="new" title="Scheme (laman tidak wujud)">Scheme</a>, <a href="/wiki/Python" title="Python">Python</a>, <a href="/w/index.php?title=Bahasa_pengaturcaraan_CLU&amp;action=edit&amp;redlink=1" class="new" title="Bahasa pengaturcaraan CLU (laman tidak wujud)">CLU</a>, <a href="/w/index.php?title=Bahasa_pengaturcaraan_Eiffel&amp;action=edit&amp;redlink=1" class="new" title="Bahasa pengaturcaraan Eiffel (laman tidak wujud)">Eiffel</a>, <a href="/wiki/Bahasa_pengaturcaraan_Dylan" class="mw-redirect" title="Bahasa pengaturcaraan Dylan">Dylan</a></td></tr><tr><th scope="row" class="infobox-label">Mempengaruhi</th><td class="infobox-data"><a href="/w/index.php?title=Bahasa_pengaturcaraan_Groovy&amp;action=edit&amp;redlink=1" class="new" title="Bahasa pengaturcaraan Groovy (laman tidak wujud)">Groovy</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Sistem_pengendalian" title="Sistem pengendalian">OS</a></th><td class="infobox-data"><a href="/wiki/Silang_pelantar" class="mw-redirect" title="Silang pelantar">Silang pelantar</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Lesen_perisian" title="Lesen perisian">Lesen</a></th><td class="infobox-data"><a rel="nofollow" class="external text" href="http://www.ruby-lang.org/en/about/license.txt/">Lesen Ruby</a> dan <a href="/wiki/Lesen_Awam_Am_GNU" title="Lesen Awam Am GNU">GPL</a></td></tr><tr><th scope="row" class="infobox-label"><a href="/wiki/Laman_web" title="Laman web">Laman web</a></th><td class="infobox-data"><a rel="nofollow" class="external text" href="http://www.ruby-lang.org">www.ruby-lang.org</a></td></tr></tbody></table> <p><b>Ruby</b> ialah dicipta sebuah <a href="/wiki/Bahasa_pengaturcaraan" title="Bahasa pengaturcaraan">bahasa pengaturcaraan</a> <a href="/wiki/Berorientasi_objek" class="mw-redirect" title="Berorientasi objek">berorientasi objek</a>. Ia menggabungkan sintaks yang diilhamkan dari <a href="/wiki/Perl" title="Perl">Perl</a> dengan ciri-ciri orientasi objek yang menyerupai <a href="/w/index.php?title=Smalltalk&amp;action=edit&amp;redlink=1" class="new" title="Smalltalk (laman tidak wujud)">Smalltalk</a>, dan juga berkongsi beberapa ciri dengan <a href="/wiki/Python" title="Python">Python</a>, <a href="/wiki/Lisp_(bahasa_pengaturcaraan)" class="mw-redirect" title="Lisp (bahasa pengaturcaraan)">Lisp</a>, <a href="/w/index.php?title=Dylan&amp;action=edit&amp;redlink=1" class="new" title="Dylan (laman tidak wujud)">Dylan</a> dan <a href="/w/index.php?title=CLU&amp;action=edit&amp;redlink=1" class="new" title="CLU (laman tidak wujud)">CLU</a>. Ruby merupakan sebuah <a href="/w/index.php?title=Bahasa_tertafsir&amp;action=edit&amp;redlink=1" class="new" title="Bahasa tertafsir (laman tidak wujud)">bahasa tertafsir</a> laluan tunggal. Pelaksanaan utamanya ialah <a href="/wiki/Perisian_bebas" title="Perisian bebas">perisian bebas</a> yang diagihkan di bawah sebuah pelesenan <a href="/wiki/Sumber_terbuka" title="Sumber terbuka">sumber terbuka</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Sejarah">Sejarah</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=1" title="Sunting bahagian: Sejarah" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=1" title="Sunting kod sumber bahagian: Sejarah"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Bahasa ini dicipta oleh <a href="/wiki/Yukihiro_Matsumoto" title="Yukihiro Matsumoto">Yukihiro Matsumoto</a> (digelar sebagai "Matz"), yang mula membina Ruby pada 24 Februari <a href="/wiki/1993" title="1993">1993</a>, dan kemudiannya menerbitkannya kepada orang awam pada tahun <a href="/wiki/1995" title="1995">1995</a>. Beliau memberi nama "Ruby" sempena <a href="/wiki/Hari_jadi" class="mw-redirect" title="Hari jadi">hari jadi</a> seorang rakan. Setakat September <a href="/wiki/2006" title="2006">2006</a>, versi stabil yang terakhir ialah 1.8.5. Ruby 1.9 (dengan beberapa perubahan besar) pula sedang dalam pembinaan. </p> <div class="mw-heading mw-heading2"><h2 id="Falsafah">Falsafah</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=2" title="Sunting bahagian: Falsafah" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=2" title="Sunting kod sumber bahagian: Falsafah"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Tanggapan utama Matz menganai reka bentuk Ruby ialah untuk menjadikan para pengaturcara gembira dengan mengurangkan bebanan kerja yang perlu mereka hadapi, iaitu dengan menuruti prinsip-prinsip reka bentuk antara muka pengguna yang baik. Beliau menegaskan bahawa reka bentuk sistem perlu menekankan kepentingan manusia, bukannya komputer: </p> <blockquote> <p>Bisanya orang, terutamanya jurutera komputer, memfokuskan mesin. Mereka fikir, "Dengan melakukan ini, mesin ini akan berjalan lebih pantas. Dengan melakukan ini, mesin ini akan berjalan dengan lebih berkesan. Dengan melakukan ini, mesin ini akan menjadi itu dan ini." Mereka memfokuskan mesin. Tetapi sebenarnya kita perlu memfokuskan manusia itu sendiri, tentang bagaimana manusia mengambil berat dengan melakukan pengaturcaraan atau mengendalikan aplikasi mesin. Kitalah ketua. Mereka [mesin] adalah hamba. </p> </blockquote> <p>Ruby dikatakan mengikut <b><a href="/wiki/Prinsip_sedikit_kejutan" class="mw-redirect" title="Prinsip sedikit kejutan">prinsip sedikit kejutan</a></b> <i>(prinsiple of least surprise)</i>, iaitu bahasa tersebut menuruti tanggapan si pengaturcara. Pepatah tersebut tidak berasal dari Matz dan, umumnya, Ruby lebih mengikut paradigma yang diistilahkan sebagai "Matz's Least Surprise", walaupun ramai pengaturcara menganggap bahawa ia juga mendekati model mental mereka. </p> <div class="mw-heading mw-heading2"><h2 id="Semantik">Semantik</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=3" title="Sunting bahagian: Semantik" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=3" title="Sunting kod sumber bahagian: Semantik"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Ruby ialah berorientasi objek: setiap satu data merupakan objek, sampaikan kelas dan jenis yang ditakrifkan bahasa lain sebagai primitif (seperti integer, boole, dan "nil"). Setiap fungsi ialah kaedah. Pemboleh ubah sentiasa merujuk kepada objek, tetapi pemboleh ubah itu sendiri bukannya objek. Ruby menyokong <a href="/wiki/Pewarisan" title="Pewarisan">pewarisan</a> dengan <b>hantaran dinamik</b> (<i>dynamic dispatch</i>), <b>campuran</b> (<i>mixin</i>) dan <b>kaedah unsur tunggal</b> (<i>singleton method</i>). Walaupun Ruby tidak menyokong <b>pewarisan berbilang</b> (<i>multiple inheritance</i>), kelas (<i>class</i>) boleh mengimport modul sebagai campuran. </p><p>Ruby telah disifatkan sebagai sebuah <a href="/wiki/Bahasa_pengaturcaraan_berbilang_paradigma" class="mw-redirect" title="Bahasa pengaturcaraan berbilang paradigma">bahasa pengaturcaraan berbilang paradigma</a>: ia membenarkan pengaturcaraan bertatacara (mentakrifkan fungsi atau pembolehubah di luar kelas membuatkan mereka sebahagian daripada akar, objek 'self'), dengan perorientasian objek (semua benda ialah objek) atau <a href="/wiki/Pengaturcaraan_kefungsian" title="Pengaturcaraan kefungsian">pengaturcaraan kefungsian</a> (ia mempunyai <a href="/w/index.php?title=Fungsi_awanama&amp;action=edit&amp;redlink=1" class="new" title="Fungsi awanama (laman tidak wujud)">fungsi awanama</a>, <a href="/w/index.php?title=Penutupan_(sains_komputer)&amp;action=edit&amp;redlink=1" class="new" title="Penutupan (sains komputer) (laman tidak wujud)">penutupan</a>, dan <a href="/w/index.php?title=Pelanjaran&amp;action=edit&amp;redlink=1" class="new" title="Pelanjaran (laman tidak wujud)">pelanjaran</a> (<i>continuation</i>); semua kenyataan ada nilainya, dan fungsi memulangkan penilaian yang terakhir). Ia menyokong <a href="/w/index.php?title=Kaji_diri_(sains_komputer)&amp;action=edit&amp;redlink=1" class="new" title="Kaji diri (sains komputer) (laman tidak wujud)">kaji diri</a>, <a href="/wiki/Pantulan_(sains_komputer)" class="mw-redirect" title="Pantulan (sains komputer)">pantulan</a> dan <a href="/w/index.php?title=Metapengaturcaraan&amp;action=edit&amp;redlink=1" class="new" title="Metapengaturcaraan (laman tidak wujud)">metapengaturcaraan</a>, di samping <a href="/w/index.php?title=Bebenang_(sains_komputer)&amp;action=edit&amp;redlink=1" class="new" title="Bebenang (sains komputer) (laman tidak wujud)">bebenang</a> berasaskan pentafsir<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup>. Ruby menampilkan <a href="/wiki/Sistem_jenis" title="Sistem jenis">penjenisan dinamik</a> serta menyokong <a href="/w/index.php?title=Polimorfisme_parameter&amp;action=edit&amp;redlink=1" class="new" title="Polimorfisme parameter (laman tidak wujud)">polimorfisme parameter</a>. </p><p>Menurut <a href="/w/index.php?title=FAQ&amp;action=edit&amp;redlink=1" class="new" title="FAQ (laman tidak wujud)">FAQ</a> Ruby,<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> "Jika anda sukakan <a href="/wiki/Perl" title="Perl">Perl</a>, anda akan sukakan Ruby dan rasa tidak asing dengan sintaksnya. Jika anda sukakan <a href="/w/index.php?title=Smalltalk&amp;action=edit&amp;redlink=1" class="new" title="Smalltalk (laman tidak wujud)">Smalltalk</a>, anda akan tidak akan rasa janggal dengan semantiknya. Jika anda sukakan <a href="/wiki/Python" title="Python">Python</a>, anda mungkin atau mungkin tidak akan tidak selesa dengan perbezaan yang amat besar dari segi rekaan antara Python dan Ruby/Perl." </p> <div class="mw-heading mw-heading2"><h2 id="Ciri-ciri">Ciri-ciri</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=4" title="Sunting bahagian: Ciri-ciri" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=4" title="Sunting kod sumber bahagian: Ciri-ciri"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Pengaturcaraan_berorientasi_objek" title="Pengaturcaraan berorientasi objek">berorientasi objek</a></li> <li>empat peringkat lingkungan pemboleh ubah: global, kelas, ciptaan <i>(instance)</i>, dan tempatan.</li> <li>tanganan pengecualian <i>(exception handling)</i></li> <li>pelelar <i>(iterator)</i> dan tutupan <i>(closure)</i> (dengan memindahkan blok kod)</li> <li><a href="/wiki/Ungkapan_nalar" class="mw-redirect" title="Ungkapan nalar">ungkapan nalar</a> <i>(regular expression)</i> yang menyerupai Perl pada peringkat teras</li> <li>pembeban pengoperasi <i>(operator overloading)</i></li> <li>kutipan sampah <i>(garbage collection)</i> automatik</li> <li>mudah alih</li> <li>pemuatan dinamik terhadap perpustakaan DLL pada hampir semua platform</li> <li><i><a href="/w/index.php?title=Introspeksi_(pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Introspeksi (pengaturcaraan) (laman tidak wujud)">introspeksi</a></i>, <a href="/w/index.php?title=Pantulan_(pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Pantulan (pengaturcaraan) (laman tidak wujud)">pantulan</a> <i>(reflection)</i>, dan <a href="/wiki/Pengaturcaraan_meta" class="mw-redirect" title="Pengaturcaraan meta">pengaturcaraan meta</a> <i>(meta-programming)</i></li> <li>pustaka piawai <i>(standard library)</i> yang agak luas</li> <li>menyokong suntikan tanggungan <i>(dependency injection)</i></li> <li>penyelanjaran <i>(continuation)</i> dan penjana <i>(generator)</i></li></ul> <div class="mw-heading mw-heading3"><h3 id="Interaksi">Interaksi</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=5" title="Sunting bahagian: Interaksi" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=5" title="Sunting kod sumber bahagian: Interaksi"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Agihan rasmi Ruby juga memasukkan "irb", sebuah <a href="/wiki/Pentafsir_(pengkomputeran)" class="mw-redirect" title="Pentafsir (pengkomputeran)">pentafsir</a> <a href="/wiki/Baris_perintah" class="mw-redirect" title="Baris perintah">baris perintah</a> (command-line) saling tindak yang boleh digunakan untuk menguji kod secara serta-merta. Demikian adalah salah satu contoh bagi sebuah sesi bersama atur cara saling tindak ini: </p> <pre>$ irb irb(main):001:0&gt; puts "Hello, Dunia" Hello, Dunia =&gt; nil irb(main):002:0&gt; 1+2 =&gt; 3 </pre> <div class="mw-heading mw-heading2"><h2 id="Kritikan">Kritikan</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=6" title="Sunting bahagian: Kritikan" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=6" title="Sunting kod sumber bahagian: Kritikan"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Antara kritikan paling utama dalam Ruby ialah tiada sokongan untuk <a href="/wiki/Unicode" title="Unicode">Unicode</a>, walau bagaimanapun ia memiliki sedikit sokongan untuk <a href="/wiki/UTF-8" title="UTF-8">UTF-8</a>. </p> <div class="mw-heading mw-heading2"><h2 id="Sintaks">Sintaks</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=7" title="Sunting bahagian: Sintaks" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=7" title="Sunting kod sumber bahagian: Sintaks"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sintaks bagi Ruby adalah hampir sama dengan Perl dan Python. Takrifan kelas dan kaedah adalah menggunakan isyarat kata kunci. Berbeza dengan Perl, pemboleh ubah tidak semestinya didahulukan dengan sigil. (sigil boleh digunakan untuk mengubah semantik lingkupan pemboleh ubah tersebut) Perbezaan yang paling ketara dengan C dan Perl ialah kata kunci biasanya digunakan untuk mentakrifkan bok kod logikal, tanpa menggunakan braket. Pemisah baris adalah signifikan dan dianggap sebagai pengakhir penyataan (noktah bertindih boleh juga digunakan sebagai alternatif). Berbeza dengan Python, engsot tidak signifikan. </p><p>Sila lihat contoh-contoh kod yang membayangkan sintaks Ruby di bahagian <b>Contoh</b> rencana ini. </p> <div class="mw-heading mw-heading2"><h2 id="Contoh">Contoh</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=8" title="Sunting bahagian: Contoh" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=8" title="Sunting kod sumber bahagian: Contoh"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Beberapa kod asas bagi Ruby: </p> <div class="mw-highlight mw-highlight-lang-ruby mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="c1"># Semua dalam Ruby, termasuk harafiah, adalah objek</span> <span class="w"> </span><span class="o">-</span><span class="mi">199</span><span class="o">.</span><span class="n">abs</span><span class="w"> </span><span class="c1"># 199</span> <span class="w"> </span><span class="s2">&quot;ruby sangat menarik&quot;</span><span class="o">.</span><span class="n">length</span><span class="w"> </span><span class="c1"># 19</span> <span class="w"> </span><span class="s2">&quot;Ali&quot;</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s2">&quot;i&quot;</span><span class="p">)</span><span class="w"> </span><span class="c1"># 2</span> <span class="w"> </span><span class="s2">&quot;Selamat pagi&quot;</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="sr">//</span><span class="p">)</span><span class="o">.</span><span class="n">uniq</span><span class="o">.</span><span class="n">sort</span><span class="o">.</span><span class="n">join</span><span class="w"> </span><span class="c1"># &quot;Saegilmpt&quot;</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Kelas">Kelas</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=9" title="Sunting bahagian: Kelas" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=9" title="Sunting kod sumber bahagian: Kelas"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Kod dibawah ini mentakrifkan sebuah kelas dinamakan Person. Sebagai tambahan untuk pengawalan, konstruktor lazim untuk mencipta objek baru, ia mempunyai dua kaedah: satu untuk menggantikan operator pembeza &lt;=&gt; (supaya <code>Array#sort</code> boleh menyusun mengikut umur) dan satu lagi untuk menggantikan kaedah <code>to_s</code> (supaya <code>Kernel#puts</code> boleh memformat outputnya). Di sini, "<code>attr_reader</code>" adalah satu contoh bagi <a href="/wiki/Pengaturcaraan_meta" class="mw-redirect" title="Pengaturcaraan meta">pengaturcaraan meta</a> dalam Ruby: "attr" mentakrifkan kaedah <i>geter (getter)</i> dan <i>penentu (setter)</i> untuk <i>pemboleh ubah ciptaan (instance variable)</i>; "attr_reader": hanya kaedah geter. Juga, penyataan terakhir yang dinilai dalam sebuah kaedah ialah nilai yang dikembalikan, oleh itu penggunaan 'return' yang eksplisit boleh diabaikan. </p> <div class="mw-highlight mw-highlight-lang-ruby mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Orang</span> <span class="w"> </span><span class="k">def</span><span class="w"> </span><span class="nf">initialize</span><span class="p">(</span><span class="n">nama</span><span class="p">,</span><span class="w"> </span><span class="n">umur</span><span class="p">)</span> <span class="w"> </span><span class="vi">@nama</span><span class="p">,</span><span class="w"> </span><span class="vi">@umur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nama</span><span class="p">,</span><span class="w"> </span><span class="n">umur</span> <span class="w"> </span><span class="k">end</span> <span class="w"> </span> <span class="w"> </span><span class="k">def</span><span class="w"> </span><span class="nf">&lt;=&gt;</span><span class="p">(</span><span class="n">orang</span><span class="p">)</span> <span class="w"> </span><span class="vi">@umur</span><span class="w"> </span><span class="o">&lt;=&gt;</span><span class="w"> </span><span class="n">orang</span><span class="o">.</span><span class="n">umur</span> <span class="w"> </span><span class="k">end</span> <span class="w"> </span> <span class="w"> </span><span class="k">def</span><span class="w"> </span><span class="nf">to_s</span> <span class="w"> </span><span class="s2">&quot;</span><span class="si">#{</span><span class="vi">@nama</span><span class="si">}</span><span class="s2"> (</span><span class="si">#{</span><span class="vi">@umur</span><span class="si">}</span><span class="s2">)&quot;</span> <span class="w"> </span><span class="k">end</span> <span class="w"> </span> <span class="w"> </span><span class="kp">attr_reader</span><span class="w"> </span><span class="ss">:nama</span><span class="p">,</span><span class="w"> </span><span class="ss">:umur</span> <span class="w"> </span><span class="k">end</span> <span class="w"> </span> <span class="w"> </span><span class="n">group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="no">Orang</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s2">&quot;Ali&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">),</span><span class="w"> </span> <span class="w"> </span><span class="no">Orang</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s2">&quot;Abu&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">63</span><span class="p">),</span><span class="w"> </span> <span class="w"> </span><span class="no">Orang</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s2">&quot;Ahmad&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">16</span><span class="p">)</span><span class="w"> </span><span class="o">]</span> <span class="w"> </span> <span class="w"> </span><span class="nb">puts</span><span class="w"> </span><span class="n">group</span><span class="o">.</span><span class="n">sort</span><span class="o">.</span><span class="n">reverse</span> </pre></div> <p>Paparan yang muncul daripada yang di atas adalah tiga nama dalam susunan umur menurun: </p> <pre>Abu (63) Ali (20) Ahmad (16) </pre> <div class="mw-heading mw-heading2"><h2 id="Rujukan">Rujukan</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=10" title="Sunting bahagian: Rujukan" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=10" title="Sunting kod sumber bahagian: Rujukan"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r6173370">.mw-parser-output .reflist{font-size:90%;margin-bottom:0.5em;list-style-type:decimal}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><a href="/w/index.php?title=Green_threads&amp;action=edit&amp;redlink=1" class="new" title="Green threads (laman tidak wujud)">Green threads</a></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.rootr.net/rubyfaq-2.html">Ruby FAQ</a></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="Pautan_luar">Pautan luar</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Ruby&amp;veaction=edit&amp;section=11" title="Sunting bahagian: Pautan luar" class="mw-editsection-visualeditor"><span>sunting</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Ruby&amp;action=edit&amp;section=11" title="Sunting kod sumber bahagian: Pautan luar"><span>sunting sumber</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><span class="languageicon" style="font-size:0.85em; font-weight:bold; color:#555" title="Bahasa (en)">(Inggeris)</span> <a rel="nofollow" class="external text" href="http://www.ruby-lang.org/en/">Tapak web rasmi Ruby</a></li> <li><span class="languageicon" style="font-size:0.85em; font-weight:bold; color:#555" title="Bahasa (id)">(Indonesia)</span> <a rel="nofollow" class="external text" href="http://www.ruby-lang.org/id/">Tapak web rasmi Ruby</a></li> <li><span class="languageicon" style="font-size:0.85em; font-weight:bold; color:#555" title="Bahasa (en)">(Inggeris)</span> <a rel="nofollow" class="external text" href="http://poignantguide.net/">Why's (Poignant) Guide to Ruby</a></li> <li><span class="languageicon" style="font-size:0.85em; font-weight:bold; color:#555" title="Bahasa (en)">(Inggeris)</span> <a rel="nofollow" class="external text" href="http://malaysia-rb.devjavu.com/">Malaysia.rb</a>, kumpulan peminat Ruby Malaysia.</li></ul> <div role="navigation" class="navbox" aria-labelledby="Bahasa_pengaturcaraan" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r5375175">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}.mw-parser-output .infobox .navbar{font-size:100%}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-lihat"><a href="/wiki/Templat:Bahasa_pengaturcaraan" title="Templat:Bahasa pengaturcaraan"><abbr title="Lihat templat ini" style=";;background:none transparent;color:inherit;border:none;box-shadow:none;padding:0;">l</abbr></a></li><li class="nv-bincang"><a href="/wiki/Perbincangan_templat:Bahasa_pengaturcaraan" title="Perbincangan templat:Bahasa pengaturcaraan"><abbr title="Bincang templat ini" style=";;background:none transparent;color:inherit;border:none;box-shadow:none;padding:0;">b</abbr></a></li><li class="nv-sunting"><a class="external text" href="https://ms.wikipedia.org/w/index.php?title=Templat:Bahasa_pengaturcaraan&amp;action=edit"><abbr title="Sunting templat ini" style=";;background:none transparent;color:inherit;border:none;box-shadow:none;padding:0;">s</abbr></a></li></ul></div><div id="Bahasa_pengaturcaraan" style="font-size:114%;margin:0 4em"><a href="/wiki/Bahasa_pengaturcaraan" title="Bahasa pengaturcaraan">Bahasa pengaturcaraan</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2"><div id="*Perbandingan&amp;#95;_*_Glosari"> <ul><li><a href="/wiki/Perbandingan_bahasa-bahasa_pengaturcaraan" title="Perbandingan bahasa-bahasa pengaturcaraan">Perbandingan</a></li> <li><a href="/wiki/Glosari_pengaturcaraan" title="Glosari pengaturcaraan">Glosari</a></li></ul> </div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"> <ul><li><a href="/wiki/ALGOL" title="ALGOL">ALGOL</a></li> <li><a href="/wiki/APL" title="APL">APL</a></li> <li><a href="/wiki/Ada_(bahasa_pengaturcaraan)" title="Ada (bahasa pengaturcaraan)">Ada</a></li> <li><a href="/wiki/BASIC" title="BASIC">BASIC</a></li> <li><a href="/wiki/C_(bahasa_pengaturcaraan)" title="C (bahasa pengaturcaraan)">C</a></li> <li><a href="/wiki/C%2B%2B" title="C++">C++</a></li> <li><a href="/wiki/C_Sharp" title="C Sharp">C#</a></li> <li><a href="/wiki/COBOL" title="COBOL">COBOL</a></li> <li><a href="/w/index.php?title=Common_Lisp&amp;action=edit&amp;redlink=1" class="new" title="Common Lisp (laman tidak wujud)">Common Lisp</a></li> <li><a href="/w/index.php?title=Eiffel_(bahasa_pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Eiffel (bahasa pengaturcaraan) (laman tidak wujud)">Eiffel</a></li> <li><a href="/w/index.php?title=Forth_(bahasa_pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Forth (bahasa pengaturcaraan) (laman tidak wujud)">FORTH</a></li> <li><a href="/wiki/Fortran" title="Fortran">Fortran</a></li> <li><a href="/wiki/Haskell" title="Haskell">Haskell</a></li> <li><a href="/wiki/Java" title="Java">Java</a></li> <li><a href="/wiki/JavaScript" title="JavaScript">JavaScript</a></li> <li><a href="/wiki/Jython" title="Jython">Jython</a></li> <li><a href="/wiki/LISP" title="LISP">LISP</a></li> <li><a href="/w/index.php?title=Logo_(bahasa_pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Logo (bahasa pengaturcaraan) (laman tidak wujud)">LOGO</a></li> <li><a href="/w/index.php?title=Mesa_(bahasa_pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Mesa (bahasa pengaturcaraan) (laman tidak wujud)">Mesa</a></li> <li><a href="/w/index.php?title=Modula-2&amp;action=edit&amp;redlink=1" class="new" title="Modula-2 (laman tidak wujud)">Modula-2</a></li> <li><a href="/w/index.php?title=Oberon_(bahasa_pengaturcaraan)&amp;action=edit&amp;redlink=1" class="new" title="Oberon (bahasa pengaturcaraan) (laman tidak wujud)">Oberon</a></li> <li><a href="/wiki/OCaml" title="OCaml">OCaml</a></li> <li><a href="/w/index.php?title=Objective-C&amp;action=edit&amp;redlink=1" class="new" title="Objective-C (laman tidak wujud)">Objective-C</a></li> <li><a href="/wiki/Perl" title="Perl">Perl</a></li> <li><a href="/wiki/PHP" title="PHP">PHP</a></li> <li><a href="/wiki/Prolog" title="Prolog">Prolog</a></li> <li><a href="/w/index.php?title=PL/I&amp;action=edit&amp;redlink=1" class="new" title="PL/I (laman tidak wujud)">PL/I</a></li> <li><a href="/wiki/Pascal_(bahasa_pengaturcaraan)" title="Pascal (bahasa pengaturcaraan)">Pascal</a></li> <li><a href="/wiki/PostScript" title="PostScript">PostScript</a></li> <li><a href="/wiki/Python" title="Python">Python</a></li> <li><a href="/wiki/Ruby_(bahasa_pengaturcaraan)" class="mw-redirect" title="Ruby (bahasa pengaturcaraan)">Ruby</a></li> <li><a href="/w/index.php?title=Scheme&amp;action=edit&amp;redlink=1" class="new" title="Scheme (laman tidak wujud)">Scheme</a></li> <li><a href="/w/index.php?title=Smalltalk&amp;action=edit&amp;redlink=1" class="new" title="Smalltalk (laman tidak wujud)">Smalltalk</a></li> <li><a href="/wiki/SQL" title="SQL">SQL</a></li> <li><a href="/wiki/Tcl" title="Tcl">Tcl</a></li> <li><a href="/wiki/Visual_Basic" title="Visual Basic">Visual Basic</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div> <ul><li><span typeof="mw:File"><span title="Kategori"><img alt="Kategori" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/48/Folder_Hexagonal_Icon.svg/16px-Folder_Hexagonal_Icon.svg.png" decoding="async" width="16" height="14" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/48/Folder_Hexagonal_Icon.svg/24px-Folder_Hexagonal_Icon.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/48/Folder_Hexagonal_Icon.svg/32px-Folder_Hexagonal_Icon.svg.png 2x" data-file-width="36" data-file-height="31" /></span></span> <a href="/wiki/Kategori:Bahasa_pengaturcaraan" title="Kategori:Bahasa pengaturcaraan">Kategori</a></li> <li><span typeof="mw:File"><span title="List-Class article"><img alt="List-Class article" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/db/Symbol_list_class.svg/16px-Symbol_list_class.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/db/Symbol_list_class.svg/24px-Symbol_list_class.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/db/Symbol_list_class.svg/32px-Symbol_list_class.svg.png 2x" data-file-width="180" data-file-height="185" /></span></span> <a href="/wiki/Senarai_bahasa_pengaturcaraan" title="Senarai bahasa pengaturcaraan">Senarai</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐57488d5c7d‐zh5cw Cached time: 20241128044420 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.138 seconds Real time usage: 0.405 seconds Preprocessor visited node count: 863/1000000 Post‐expand include size: 15966/2097152 bytes Template argument size: 805/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 2/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 8327/5000000 bytes Lua time usage: 0.032/10.000 seconds Lua memory usage: 935769/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 342.938 1 -total 18.78% 64.413 1 Templat:Infobox_programming_language 11.42% 39.148 1 Templat:Daftar_bahasa_pengaturcaraan 9.54% 32.724 1 Templat:Infobox 9.02% 30.935 1 Templat:Navbox 6.66% 22.852 1 Templat:Reflist 4.68% 16.060 3 Templat:En 3.56% 12.201 2 Templat:Bahasa_pautan 2.55% 8.731 1 Templat:Id 1.89% 6.479 2 Templat:Nama_ISO_639 --> <!-- Saved in parser cache with key mswiki:pcache:42089:|#|:idhash:canonical and timestamp 20241128044420 and revision id 4476506. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Diambil daripada "<a dir="ltr" href="https://ms.wikipedia.org/w/index.php?title=Ruby&amp;oldid=4476506">https://ms.wikipedia.org/w/index.php?title=Ruby&amp;oldid=4476506</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Khas:Kategori" title="Khas:Kategori">Kategori</a>: <ul><li><a href="/w/index.php?title=Kategori:Pages_using_deprecated_source_tags&amp;action=edit&amp;redlink=1" class="new" title="Kategori:Pages using deprecated source tags (laman tidak wujud)">Pages using deprecated source tags</a></li><li><a href="/wiki/Kategori:Ruby" title="Kategori:Ruby">Ruby</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Laman ini kali terakhir disunting pada 03:21, 18 November 2018.</li> <li id="footer-info-copyright">Teks disediakan di bawah <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ms">Lesen Creative Commons Pengiktirafan/Perkongsian Serupa</a>; terma tambahan mungkin digunapakai. Lihat <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terma Penggunaan</a> untuk butiran lanjut.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Dasar privasi</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Perihal">Perihal Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Penafian_umum">Penafian</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Kod Tatakelakuan</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Pembangun</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/ms.wikipedia.org">Statistik</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Kenyataan kuki</a></li> <li id="footer-places-mobileview"><a href="//ms.m.wikipedia.org/w/index.php?title=Ruby&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Paparan mudah alih</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-6b8d669998-2tmf5","wgBackendResponseTime":186,"wgPageParseReport":{"limitreport":{"cputime":"0.138","walltime":"0.405","ppvisitednodes":{"value":863,"limit":1000000},"postexpandincludesize":{"value":15966,"limit":2097152},"templateargumentsize":{"value":805,"limit":2097152},"expansiondepth":{"value":8,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":8327,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 342.938 1 -total"," 18.78% 64.413 1 Templat:Infobox_programming_language"," 11.42% 39.148 1 Templat:Daftar_bahasa_pengaturcaraan"," 9.54% 32.724 1 Templat:Infobox"," 9.02% 30.935 1 Templat:Navbox"," 6.66% 22.852 1 Templat:Reflist"," 4.68% 16.060 3 Templat:En"," 3.56% 12.201 2 Templat:Bahasa_pautan"," 2.55% 8.731 1 Templat:Id"," 1.89% 6.479 2 Templat:Nama_ISO_639"]},"scribunto":{"limitreport-timeusage":{"value":"0.032","limit":"10.000"},"limitreport-memusage":{"value":935769,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-57488d5c7d-zh5cw","timestamp":"20241128044420","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Ruby","url":"https:\/\/ms.wikipedia.org\/wiki\/Ruby","sameAs":"http:\/\/www.wikidata.org\/entity\/Q161053","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q161053","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Yayasan Wikimedia Bhd.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2006-10-23T18:42:39Z","dateModified":"2018-11-18T03:21:41Z"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10