summaryrefslogtreecommitdiff
path: root/sample
AgeCommit message (Collapse)Author
2025-04-18Revert "* remove trailing spaces. [ci skip]"v3_5_0_preview1Takashi Kokubun
This reverts commit 6062c904ae2c4d6a9fafb1a0e22841da85892eea. tompng said animation becomes weird if you remove trailing spaces. We fixed auto-style instead https://github.com/ruby/git.ruby-lang.org/commit/a8635a4cd93c8adc2e1b48b6ae8fa3fcd3bb4b34.
2025-04-17* remove trailing spaces. [ci skip]git
2025-04-17sample/trick2025/: adds the top-five entries of TRICK 2025Yusuke Endoh
See https://github.com/tric/trick2025 for TRICK 2025. Notes: Merged: https://github.com/ruby/ruby/pull/13122
2025-01-16Migrate win32ole as bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/12583
2024-10-16* remove trailing spaces. [ci skip]git
2024-10-16[ruby/prism] Add a sample for multiplexing constantsKevin Newton
https://github.com/ruby/prism/commit/e265dc5862
2024-10-16[ruby/prism] RelocationKevin Newton
https://github.com/ruby/prism/commit/5ea6042408
2024-08-12[ruby/prism] Add sample for generating tagsKevin Newton
https://github.com/ruby/prism/commit/7c9ca47ac5
2024-07-16[ruby/prism] Move sample files under sample/prismKevin Newton
https://github.com/ruby/prism/commit/9e9b069404
2024-06-06[ruby/prism] Add some code samplesKevin Newton
https://github.com/ruby/prism/commit/f5c883af56
2024-06-06[ruby/prism] Add some samples for using prism APIsKevin Newton
https://github.com/ruby/prism/commit/6a4fe21088
2024-01-28[ruby/win32ole] [DOC] Move sample to toplevelNobuyoshi Nakada
https://github.com/ruby/win32ole/commit/70ea60c4d2
2024-01-16Removed sample code for net-imap. net-imap is alread extracted as bundled gemsHiroshi SHIBATA
2024-01-16Unbundled samples for getoptlongHiroshi SHIBATA
2023-02-27Add all-ruby-quine as a sample codeYusuke Endoh
This sample code works on all release versions of Ruby, from Ruby 0.49. Notes: Merged: https://github.com/ruby/ruby/pull/7380
2023-02-15Refactor dir.rb sample (#6977) [ci skip]Thomas R. Koll
* Refactor dir.rb sample The original (1998) sample with a for-loop and use of case/when isn't what we'd write nowadays * [DOC] Update sample/dir.rb [ci skip] Do not leave a `Dir` opened. * [DOC] Update sample/dir.rb [ci skip] Fix ArgumentError. --------- Co-authored-by: Nobuyoshi Nakada <[email protected]> Notes: Merged-By: hsbt <[email protected]>
2022-12-24sample/trick2022/03-mame/entry.rb: remove trailing spacesYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/7014
2022-12-24sample/trick2022/: adds the top-three entries of TRICK 2022Yusuke Endoh
See https://github.com/tric/trick2022 for TRICK 2022. Notes: Merged: https://github.com/ruby/ruby/pull/7014
2022-12-05Use io/console to avoid stty error [ci skip]Nobuyoshi Nakada
2022-12-01Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6834
2022-11-05Sync TRICK 2018 (02-mame)Yusuke Endoh
https://github.com/tric/trick2018/pull/5
2022-05-20Fix typo in README (#5925)Yudai Takada
"iteretor" -> "iterator" Notes: Merged-By: k0kubun <[email protected]>
2022-05-09[ruby/getoptlong] ruby/ruby used sample, not examplesHiroshi SHIBATA
https://github.com/ruby/getoptlong/commit/39faa7b390
2021-12-28Remove obsolete Fixnum and BignumNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3927
2021-11-03Fix typos [ci skip]Nobuyoshi Nakada
2021-08-25Clean up lambda output from exyacc.rbKevin Newton
The `lambda_body` grammar rule has a `"}"`, which is throwing off the `exyacc.rb` regular expressions. This changes the regular expression to account for `"}"` as well, which makes the output of `ruby sample/exyacc.rb < parse.y` change by the following diff: ```diff 632,634d631 < ", &@3); < $$ = $2; < } ``` Which makes it closer to a valid EBNF. Notes: Merged: https://github.com/ruby/ruby/pull/4778
2021-06-29Prefer qualified names under ThreadNobuyoshi Nakada
2021-03-22[Doc] Fix a typo s/interseting/interesting/Kenichi Kamiya
Notes: Merged: https://github.com/ruby/ruby/pull/4304
2021-03-16[ruby/openssl] sample: update obsolete API useKazuki Yamaguchi
https://github.com/ruby/openssl/commit/dafa851c0d Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] sample: avoid "include OpenSSL"Kazuki Yamaguchi
It is not a common practice and should not be done since it causes name clash: for example, Digest and Random are provided by other standard libraries of Ruby. Fixes: https://github.com/ruby/openssl/issues/419 https://github.com/ruby/openssl/commit/6a6444984b Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-03-16[ruby/openssl] pkey: prefer PKey.read over PKey::RSA.new in docsKazuki Yamaguchi
https://github.com/ruby/openssl/commit/cf92a3ffba Notes: Merged: https://github.com/ruby/ruby/pull/4275
2021-01-17Remove samples for test-unitSutou Kouhei
They are no longer needed.
2021-01-17Move rss samples to ruby/rssSutou Kouhei
2020-12-24sample/trick2015/kinaba/entry.rb: The constant "Data" has been removedYusuke Endoh
Instead, use "Proc" as a 4-letter constant.
2020-12-19Fix `warning: instance variable @head not initialized` and remove unused ↵Kazuhiro NISHIYAMA
instance variable
2020-12-10webrick was removed from ruby repoHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3729
2020-08-27Use own mutex instead of Thread.exclusiveKazuhiro NISHIYAMA
ref [Feature #17125]
2020-07-28Use https instead of httpKazuhiro NISHIYAMA
2020-05-13[ruby/openssl] Look up digest by name instead of constantBart de Water
https://github.com/ruby/openssl/commit/b28fb2f05c
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-11-09Remove unneeded exec bits from some filesDavid Rodríguez
I noticed that some files in rubygems were executable, and I could think of no reason why they should be. In general, I think ruby files should never have the executable bit set unless they include a shebang, so I run the following command over the whole repo: ```bash find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \; ``` Notes: Merged: https://github.com/ruby/ruby/pull/2662
2019-11-01Fix a typo [ci skip]Kazuhiro NISHIYAMA
Notes: Merged: https://github.com/ruby/ruby/pull/2510
2019-08-25Fix sample/drb/http0serv.rbJeremy Evans
Previously, trying to use this would result in: undefined method `uri' for #<DRb::HTTP0::ServerSide:0x00000aec9f1637f8> (NoMethodError) Also, use a relative require to load sample/drb/http0.rb. Fixes [Bug #13431]
2019-08-19Drop duplicated sample code (#2389) [ci skip]Kenichi Kamiya
* Drop duplicated sample code * Drop another style sample https://github.com/ruby/ruby/pull/2389#issuecomment-522489520 * Update sample list
2019-08-19Remove unused variable to suppress warning (#2388) [ci skip]Kenichi Kamiya
``` sample/observ.rb:30: warning: assigned but unused variable - clock ```
2019-08-19Update a sample code (#2387)Kenichi Kamiya
Kernel#inspect does not call #to_s now To follow https://github.com/ruby/ruby/commit/fd7dc23d281f38a71fa7f9c32812cd468c4b1788
2019-08-19Accurate a sample to show having some ext (#2385)Kenichi Kamiya
2019-08-17Clean sample code biorhythm (#2375)Kenichi Kamiya
* Standardize to load date libary code > git grep 'require .date.' | wc -l 179 > git grep 'require .date\.rb' | wc -l 1 * Simplify
2019-08-17Simplify a sample code (#2374)Kenichi Kamiya
2019-02-04For this may be a syntax error (instead of LocalJumpError) in Ruby 2.7ko1
[Fix GH-2078] This patch is from Yutaka HARA <[email protected]>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e