Граф коммитов

380 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 9eae8cdefb
Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
Kenichi Kamiya ec4a41c4dd [Doc] Fix a typo s/interseting/interesting/ 2021-03-22 15:33:32 +09:00
Kazuki Yamaguchi 7f0b3fb906 [ruby/openssl] sample: update obsolete API use
https://github.com/ruby/openssl/commit/dafa851c0d
2021-03-16 19:37:06 +09:00
Kazuki Yamaguchi e35d3623de [ruby/openssl] sample: avoid "include OpenSSL"
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
2021-03-16 19:37:06 +09:00
Kazuki Yamaguchi 10d360847b [ruby/openssl] pkey: prefer PKey.read over PKey::RSA.new in docs
https://github.com/ruby/openssl/commit/cf92a3ffba
2021-03-16 19:16:10 +09:00
Sutou Kouhei a4a6cb036e Remove samples for test-unit
They are no longer needed.
2021-01-17 06:08:21 +09:00
Sutou Kouhei f2767cf091 Move rss samples to ruby/rss 2021-01-17 06:07:54 +09:00
Yusuke Endoh a8fc72f5a8 sample/trick2015/kinaba/entry.rb: The constant "Data" has been removed
Instead, use "Proc" as a 4-letter constant.
2020-12-24 01:51:46 +09:00
Kazuhiro NISHIYAMA 144b11e03e
Fix `warning: instance variable @head not initialized` and remove unused instance variable 2020-12-19 15:24:09 +09:00
Hiroshi SHIBATA 05cc58c2eb webrick was removed from ruby repo 2020-12-10 18:06:25 +09:00
Kazuhiro NISHIYAMA 3353baac3d
Use own mutex instead of Thread.exclusive
ref [Feature #17125]
2020-08-27 14:37:03 +09:00
Kazuhiro NISHIYAMA 946cd6c534
Use https instead of http 2020-07-28 19:51:54 +09:00
Bart de Water 0b2c70eaa1 [ruby/openssl] Look up digest by name instead of constant
https://github.com/ruby/openssl/commit/b28fb2f05c
2020-05-13 15:47:51 +09:00
Nobuyoshi Nakada db16629008
Fixed misspellings
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-20 09:32:42 +09:00
David Rodríguez f48655d04d Remove unneeded exec bits from some files
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' _ {} \;
```
2019-11-09 21:36:30 +09:00
Kazuhiro NISHIYAMA cc8116b03e Fix a typo [ci skip] 2019-11-01 18:33:58 +09:00
Jeremy Evans 71d97a5ef8 Fix sample/drb/http0serv.rb
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-25 10:56:47 -07:00
Kenichi Kamiya 8882986d97 Drop duplicated sample code (#2389) [ci skip]
* Drop duplicated sample code

* Drop another style sample

https://github.com/ruby/ruby/pull/2389#issuecomment-522489520

* Update sample list
2019-08-19 18:43:23 +09:00
Kenichi Kamiya 9b330200f8 Remove unused variable to suppress warning (#2388) [ci skip]
```
sample/observ.rb:30: warning: assigned but unused variable - clock
```
2019-08-19 18:16:45 +09:00
Kenichi Kamiya cda8664471 Update a sample code (#2387)
Kernel#inspect does not call #to_s now

To follow fd7dc23d28
2019-08-19 18:00:29 +09:00
Kenichi Kamiya 605d2ce9b9 Accurate a sample to show having some ext (#2385) 2019-08-19 17:30:59 +09:00
Kenichi Kamiya 9d20d2b0f5 Clean sample code biorhythm (#2375)
* Standardize to load date libary code

> git grep 'require .date.' | wc -l
179
> git grep 'require .date\.rb' | wc -l
1

* Simplify
2019-08-17 15:03:00 +09:00
Kenichi Kamiya 72adc6cffb Simplify a sample code (#2374) 2019-08-17 14:56:57 +09:00
ko1 8bda94f78c For this may be a syntax error (instead of LocalJumpError) in Ruby 2.7
[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
2019-02-04 06:28:57 +00:00
kazu d1dce26b94 sample/fib.py: Fix syntax error in Python 3 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 23:36:47 +00:00
mame a8812080c4 Fix typo in trick2018/README [ci skip]
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-03 10:35:13 +00:00
mame 1c26ca1e7e sample/trick2013/mame/music-box.mp4: removed
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-12-03 01:59:29 +00:00
mame 7d5fad1bc5 sample/trick2018/03-tompng: merge upstream fixes
* 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-10-17 14:35:02 +00:00
kazu 5b666803f1 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-23 09:49:45 +00:00
svn c5229a942b * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-21 13:07:52 +00:00
mame e613cdd53d sample/trick2018/: adds the top-five entries of TRICK 2018
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-07-21 13:07:50 +00:00
kazu 9d091c851a sample/timeout.rb: Remove unnecessary increment [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-22 13:01:17 +00:00
kazu 23358107f9 sample/timeout.rb: fix warnings
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-03-16 14:09:40 +00:00
k0kubun cc777d09f4 erb.rb: deprecate safe_level of ERB.new
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-02-22 13:28:25 +00:00
normal 3f059374b8 sample/iseq_loader: use File.open instead of Kernel#open
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-12 09:31:22 +00:00
normal 6ef345ab22 sample/iseq_loader.rb: spelling fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-12 09:31:17 +00:00
hsbt d675b9de6c Fixed typos.
* 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
2018-01-12 09:07:47 +00:00
kazu 6064132c42 Remove unnecessary `require 'thread'`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08 07:00:01 +00:00
nobu fb38cfb90f Update trick2013/yhara for Ruby 2.4
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-09-22 11:21:34 +00:00
kazu 5c10fb414a Fix NoMethodError [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-03 01:44:52 +00:00
kazu 2430822b96 Use `\A` and `\z` instead of `^` and `$` [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-02 11:26:28 +00:00
nobu cd6d919373 pty/shl.rb: update [ci skip]
* 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-05 01:26:27 +00:00
nobu b163b3ff64 pty/shl.rb: update [ci skip]
* 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-04 10:48:15 +00:00
nobu 69b6471104 pty/shl.rb: update [ci skip]
* 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-04 10:48:14 +00:00
nobu 0d98fd889f pty/shl.rb: update [ci skip]
* 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-04 10:48:13 +00:00
kazu 5b540799bf sample/pty/shl.rb: update sample
* 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-04 06:49:07 +00:00
kazu af2009a58f sample/pty/script.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 06:49:06 +00:00
kazu 2cc0461bfa sample/pty/expect_sample.rb: Update sample
* 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
2017-02-04 06:49:04 +00:00
nobu 716610ae56 get rid of ambiguous parentheses warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29 16:06:54 +00:00
kazu 38fa442de9 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-27 00:45:46 +00:00