summaryrefslogtreecommitdiff
path: root/sample
Commit message (Collapse)AuthorAgeFilesLines
* Prefer qualified names under ThreadNobuyoshi Nakada2021-06-291-1/+1
|
* [Doc] Fix a typo s/interseting/interesting/Kenichi Kamiya2021-03-221-1/+1
|
* [ruby/openssl] sample: update obsolete API useKazuki Yamaguchi2021-03-163-8/+7
| | | | https://github.com/ruby/openssl/commit/dafa851c0d
* [ruby/openssl] sample: avoid "include OpenSSL"Kazuki Yamaguchi2021-03-165-27/+23
| | | | | | | | | | 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
* [ruby/openssl] pkey: prefer PKey.read over PKey::RSA.new in docsKazuki Yamaguchi2021-03-165-5/+5
| | | | https://github.com/ruby/openssl/commit/cf92a3ffba
* Remove samples for test-unitSutou Kouhei2021-01-175-68/+0
| | | | They are no longer needed.
* Move rss samples to ruby/rssSutou Kouhei2021-01-175-388/+0
|
* sample/trick2015/kinaba/entry.rb: The constant "Data" has been removedYusuke Endoh2020-12-241-1/+1
| | | | Instead, use "Proc" as a 4-letter constant.
* Fix `warning: instance variable @head not initialized` and remove unused ↵Kazuhiro NISHIYAMA2020-12-191-1/+4
| | | | instance variable
* webrick was removed from ruby repoHiroshi SHIBATA2020-12-109-196/+0
|
* Use own mutex instead of Thread.exclusiveKazuhiro NISHIYAMA2020-08-271-1/+2
| | | | ref [Feature #17125]
* Use https instead of httpKazuhiro NISHIYAMA2020-07-281-2/+2
|
* [ruby/openssl] Look up digest by name instead of constantBart de Water2020-05-133-3/+3
| | | | https://github.com/ruby/openssl/commit/b28fb2f05c
* Fixed misspellingsNobuyoshi Nakada2019-12-203-4/+4
| | | | Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
* Remove unneeded exec bits from some filesDavid Rodríguez2019-11-091-0/+0
| | | | | | | | | | | | | 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' _ {} \; ```
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2019-11-011-1/+1
|
* Fix sample/drb/http0serv.rbJeremy Evans2019-08-251-3/+5
| | | | | | | | | | 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]
* Drop duplicated sample code (#2389) [ci skip]Kenichi Kamiya2019-08-194-28/+1
| | | | | | | | | | * Drop duplicated sample code * Drop another style sample https://github.com/ruby/ruby/pull/2389#issuecomment-522489520 * Update sample list
* Remove unused variable to suppress warning (#2388) [ci skip]Kenichi Kamiya2019-08-191-1/+1
| | | | | ``` sample/observ.rb:30: warning: assigned but unused variable - clock ```
* Update a sample code (#2387)Kenichi Kamiya2019-08-191-1/+1
| | | | | Kernel#inspect does not call #to_s now To follow https://github.com/ruby/ruby/commit/fd7dc23d281f38a71fa7f9c32812cd468c4b1788
* Accurate a sample to show having some ext (#2385)Kenichi Kamiya2019-08-191-1/+1
|
* Clean sample code biorhythm (#2375)Kenichi Kamiya2019-08-171-5/+4
| | | | | | | | | | | * Standardize to load date libary code > git grep 'require .date.' | wc -l 179 > git grep 'require .date\.rb' | wc -l 1 * Simplify
* Simplify a sample code (#2374)Kenichi Kamiya2019-08-171-2/+2
|
* For this may be a syntax error (instead of LocalJumpError) in Ruby 2.7ko12019-02-041-1/+1
| | | | | | | | | [Fix GH-2078] This patch is from Yutaka HARA <yutaka.hara+github@gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/fib.py: Fix syntax error in Python 3 [ci skip]kazu2018-12-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in trick2018/README [ci skip]mame2018-12-031-1/+1
| | | | | | | | s/dimentional/dimensional From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/trick2013/mame/music-box.mp4: removedmame2018-12-031-0/+0
| | | | | | The tarball will be reduced by about 568 kB. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/trick2018/03-tompng: merge upstream fixesmame2018-10-173-6/+4
| | | | | | | | | | * Remove `ruby '2.5.0'` * Add `source 'https://rubygems.org'` * Avoid `Kernel#Integer` Thanks to tompng. Fixes #14930. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo [ci skip]kazu2018-07-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2018-07-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/trick2018/: adds the top-five entries of TRICK 2018mame2018-07-2121-0/+372
| | | | | | | See https://github.com/tric/trick2018 for TRICK 2018. Fixes #14930. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/timeout.rb: Remove unnecessary increment [ci skip]kazu2018-03-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/timeout.rb: fix warningskazu2018-03-161-8/+8
| | | | | | | warning: Object#timeout is deprecated, use Timeout.timeout instead. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* erb.rb: deprecate safe_level of ERB.newk0kubun2018-02-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/iseq_loader: use File.open instead of Kernel#opennormal2018-01-121-2/+2
| | | | | | | This makes auditing for inadvertant command execution easier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/iseq_loader.rb: spelling fixnormal2018-01-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed typos.hsbt2018-01-122-2/+2
| | | | | | | * sample/trick2013/kinaba/remarks.markdown: algorthim -> algorithm * sample/trick2015/ksk_1/remarks.markdown: Limination -> Limitation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unnecessary `require 'thread'`kazu2017-10-0812-14/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update trick2013/yhara for Ruby 2.4nobu2017-09-221-1/+1
| | | | | | | | | | | I need to raise LocalJumpError here (for the first "J" of the output "JUST ANOTHER RUBY HACKER"), but this `return` does not raise error in Ruby 2.4. [Fix GH-1703] Author: Yutaka HARA <yutaka.hara+github@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix NoMethodError [ci skip]kazu2017-05-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `\A` and `\z` instead of `^` and `$` [ci skip]kazu2017-05-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pty/shl.rb: update [ci skip]nobu2017-02-051-12/+12
| | | | | | | * sample/pty/shl.rb: leap exited child process. [ruby-dev:49974] [Bug #13191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pty/shl.rb: update [ci skip]nobu2017-02-041-8/+6
| | | | | | | * sample/pty/shl.rb: do not manage array length separately. [ruby-dev:49974] [Bug #13191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pty/shl.rb: update [ci skip]nobu2017-02-041-2/+3
| | | | | | | * sample/pty/shl.rb: use io/console instead of stty. [ruby-dev:49974] [Bug #13191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pty/shl.rb: update [ci skip]nobu2017-02-041-1/+2
| | | | | | | | * sample/pty/shl.rb: stop writer loop when the child exited. PTY::ChildExited no longer raises asynchronously since r20298. [ruby-dev:49974] [Bug #13191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/pty/shl.rb: update samplekazu2017-02-041-3/+4
| | | | | | | | * Specify frozen_string_literal: true. * Fix TypeError of raise. * Use a character literal instead of Integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/pty/script.rb: Specify frozen_string_literal: true.kazu2017-02-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sample/pty/expect_sample.rb: Update samplekazu2017-02-041-2/+12
| | | | | | | | * Fix regexp capture scope bug. * Specify frozen_string_literal: true. * Use passive mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of ambiguous parentheses warningsnobu2016-11-291-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-10-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e