summaryrefslogtreecommitdiff
path: root/sample
AgeCommit message (Collapse)Author
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 <yutaka.hara+github@gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18sample/fib.py: Fix syntax error in Python 3 [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03Fix typo in trick2018/README [ci skip]mame
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
2018-12-03sample/trick2013/mame/music-box.mp4: removedmame
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
2018-10-17sample/trick2018/03-tompng: merge upstream fixesmame
* 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
2018-07-23Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-21* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-21sample/trick2018/: adds the top-five entries of TRICK 2018mame
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
2018-03-22sample/timeout.rb: Remove unnecessary increment [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16sample/timeout.rb: fix warningskazu
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
2018-02-22erb.rb: deprecate safe_level of ERB.newk0kubun
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
2018-01-12sample/iseq_loader: use File.open instead of Kernel#opennormal
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
2018-01-12sample/iseq_loader.rb: spelling fixnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12Fixed typos.hsbt
* 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
2017-10-08Remove unnecessary `require 'thread'`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-22Update trick2013/yhara for Ruby 2.4nobu
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
2017-05-03Fix NoMethodError [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02Use `\A` and `\z` instead of `^` and `$` [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-05pty/shl.rb: update [ci skip]nobu
* 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
2017-02-04pty/shl.rb: update [ci skip]nobu
* 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
2017-02-04pty/shl.rb: update [ci skip]nobu
* 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
2017-02-04pty/shl.rb: update [ci skip]nobu
* 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
2017-02-04sample/pty/shl.rb: update samplekazu
* 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
2017-02-04sample/pty/script.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04sample/pty/expect_sample.rb: Update samplekazu
* 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
2016-11-29get rid of ambiguous parentheses warningsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-07* basictest/test.rb: Adjust spaces in class declarationshsbt
with inheritance. [fix GH-1227] Patch by @adrfer * lib/irb/*: ditto. * lib/prime.rb: ditto. * lib/shell/builtin-command.rb: ditto. * object.c: ditto. * sample/*.rb: ditto. * test/-ext-/method/test_arity.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29import Ruby/OpenSSL 2.0.0.beta.1rhe
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1. ext/openssl is now converted into a default gem. The full commit history since r55538 can be found at: https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1 [Feature #9612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-16* common.mk: test-sample was changed to test-basic.hsbt
[Feature #11982][ruby-core:72823] * basictest/runner.rb: ditto. rename from tool/rubytest.rb. * basictest/test.rb: ditto. rename from sample/test.rb. * defs/gmake.mk: picked from r53540 * sample/test.rb: backword compatibility for chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-15Revert r53539 and r53540nobu
* basictest/test.rb: revert r53539 because it depends on r53537. * gmake.mk: ditto, revert r53540. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-15Revert "* common.mk: test-sample was changed to test-basic."naruse
This reverts r53537. Fix chkbuild first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-15* common.mk: test-sample was changed to test-basic.hsbt
[Feature #11982][ruby-core:72823] * basictest/runner.rb: ditto. rename from tool/rubytest.rb. * basictest/test.rb: ditto. rename from sample/test.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-11* sample/trick2015/: added the award-winning entries of TRICK 2015.mame
See https://github.com/tric/trick2015 for the contest outline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* iseq.c: rename methodsko1
RubyVM::InstructionSequence#to_binary_format -> #to_binary RubyVM::InstructionSequence.from_binary_format -> .load_from_binary RubyVM::InstructionSequence.from_binary_format_extra_data -> .load_from_binary_extra_data * iseq.c: fix document of iseq.to_binary. [Fix GH-1134] * sample/iseq_loader.rb: catch up this change. * test/lib/iseq_loader_checker.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e