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

7161 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada ffdef3674a
Warn instance variable `E`
It is not dumped, as it is a short alias for `:encoding`.
2019-08-10 13:18:41 +09:00
Yusuke Endoh 8877dbe400 ext/ripper/lib/ripper/lexer.rb: Consistently use `Array#push`
instead of <<.  All the other callsites use `push`.
2019-08-07 03:13:17 +09:00
Yusuke Endoh ef8c5161b4 ext/ripper/lib/ripper/lexer.rb: fix a wrong delegation
The target method name is a typo.
2019-08-07 03:12:49 +09:00
Jeremy Evans 2b6441196e Remove documentation of %m in Syslog
Fixes [Bug #6726]
2019-08-05 16:10:25 -07:00
Yusuke Endoh 58a478bce4 ext/psych/yaml/loader.c: Cast the difference of pointers to int
instead of casting a pointer to int.
Follow up of 39622232c7.
2019-08-05 14:38:59 +09:00
Hiroshi SHIBATA 39622232c7
Suppress warnings of bundled libyaml. 2019-08-04 20:12:43 +09:00
David Carlier 2d189a6721
yaml few build warning fixes
Closes: https://github.com/ruby/ruby/pull/2283
2019-08-04 09:46:46 +09:00
Dmitry Petrashko b6cfacc85d
Remove dependency on `openssl/conf_api.h`
None of the functions defined in this header are actually used in Ruby.
Fixes build against boringssl that does not have this file.
Closes: https://github.com/ruby/ruby/pull/2210
2019-08-04 09:25:32 +09:00
Yusuke Endoh b8e351a1b9 ext/-test-/bug-14834/bug-14384.c: fallback for MAYBE_UNUSED
__unused__ is unavailable on Sun C.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190801T112505Z.fail.html.gz
2019-08-01 21:09:59 +09:00
卜部昌平 fd0e3bd249 fix VC 2013 compile error
It seems the compiler does not support VLAs.
See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
2019-08-01 16:19:49 +09:00
卜部昌平 5d33f78716 fix tracepoint + backtrace SEGV
PC modification in gc_event_hook_body was careless.  There are (so
to say) abnormal iseqs stored in the cfp.  We have to check sanity
before we touch the PC.

This has not been fixed because there was no way to (ab)use the
setup from pure-Ruby.  However by using our official C APIs it is
possible to touch such frame(s), resulting in SEGV.

Fixes [Bug #14834].
2019-08-01 16:00:59 +09:00
git e315f3a134 * expand tabs. 2019-07-31 10:22:47 +09:00
Koichi Sasada 72825c35b0 Use 1 byte hint for ar_table [Feature #15602]
On ar_table, Do not keep a full-length hash value (FLHV, 8 bytes)
but keep a 1 byte hint from a FLHV (lowest byte of FLHV).
An ar_table only contains at least 8 entries, so hints consumes
8 bytes at most. We can store hints in RHash::ar_hint.

On 32bit CPU, we use 4 entries ar_table.

The advantages:
* We don't need to keep FLHV so ar_table only consumes
  16 bytes (VALUEs of key and value) * 8 entries = 128 bytes.
* We don't need to scan ar_table, but only need to check hints
  in many cases. Especially we don't need to access ar_table
  if there is no match entries (in many cases).
  It will increase memory cache locality.

The disadvantages:
* This technique can increase `#eql?` time because hints can
  conflicts (in theory, it conflicts once in 256 times).
  It can introduce incompatibility if there is a object x where
  x.eql? returns true even if hash values are different.
  I believe we don't need to care such irregular case.
* We need to re-calculate FLHV if we need to switch from ar_table
  to st_table (e.g. exceeds 8 entries).
  It also can introduce incompatibility, on mutating key objects.
  I believe we don't need to care such irregular case too.

Add new debug counters to measure the performance:
* artable_hint_hit - hint is matched and eql?#=>true
* artable_hint_miss - hint is not matched but eql?#=>false
* artable_hint_notfound - lookup counts
2019-07-31 09:52:03 +09:00
Nobuyoshi Nakada 077c28887a
[ruby/io-console] Do not use add_development_dependency
https://github.com/ruby/io-console/commit/bc77f46391
2019-07-25 08:16:57 +09:00
Nobuyoshi Nakada 414d6cf1d3 [ruby/psych] Get rid of C90 feature
For ruby 2.6 and earlier.

https://travis-ci.org/ruby/psych/jobs/562435717#L245-L248

```
../../../../ext/psych/psych_parser.c: In function ‘make_exception’:
../../../../ext/psych/psych_parser.c:87:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     VALUE ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
     ^
```

https://github.com/ruby/psych/commit/aa457443b8
2019-07-25 07:52:19 +09:00
Jean Boussier 6ca7dc69ef [ruby/psych] Deduplicate hash keys if they're strings
https://github.com/ruby/psych/commit/0414982ffd
2019-07-25 07:52:16 +09:00
Hiroshi SHIBATA 50076903ab
[ruby/psych] Drop to support fat gem support.
ref. https://github.com/ruby/bigdecimal/pull/149

https://github.com/ruby/psych/commit/25ae263252
2019-07-25 07:50:37 +09:00
Hiroshi SHIBATA 938032a790
[ruby/psych] Do not use add_development_dependency.
https://github.com/ruby/psych/commit/939754237f
2019-07-25 07:47:07 +09:00
Jeremy Evans 9095ff53cf [ruby/date] Describe what is meant by valid in the Date.valid_date? rdoc
https://github.com/ruby/date/commit/8eca79d1f0
2019-07-22 17:36:20 +09:00
Nobuyoshi Nakada 8deabcd328
Constified afamily functions 2019-07-16 18:42:56 +09:00
Nobuyoshi Nakada 75fb0a9afa
Allow mday in Date.iso8601 to be omitted
[Bug #12285]
2019-07-16 09:41:23 +09:00
Koichi Sasada 223854ebe8 catch up e8ddbc0239. 2019-07-15 09:58:26 +09:00
Yusuke Endoh deb5e58230 ext/stringio/stringio.c (strio_read): "binray" is always zero here
Remove unused conditional expression to suppress Coverity Scan warnings.
2019-07-15 00:20:32 +09:00
Yusuke Endoh 80da68db1e Add a /* fall through */ comment 2019-07-14 23:36:23 +09:00
Tanaka Akira 4900a10689 socket: use frozen string buffer when releasing GVL
Thanks for the patch by normalperson (Eric Wong) [Bug #14204].
2019-07-14 20:46:51 +09:00
Nobuyoshi Nakada 715955ff27
Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
Nobuyoshi Nakada 32f0135144
Split RUBY_ASSERT and so on under include/ruby 2019-07-14 17:45:21 +09:00
Tanaka Akira 4d9504fe13 Delegates 3 arguments for Pathname.glob.
Thanks for the patch by pocke (Masataka Kuwabara) [Feature #14405].
2019-07-14 17:42:58 +09:00
Nobuyoshi Nakada dcb8c41a1e
Added depend files 2019-07-14 01:31:29 +09:00
Nobuyoshi Nakada 331eccf3fe
Removed useless `freeze`s from gemspec files 2019-07-13 07:25:54 +09:00
Nobuyoshi Nakada fd9f26df00
Drop fossil rubygems support 2019-07-13 07:25:54 +09:00
Nobuyoshi Nakada 143581cf4e
Removed stub lines from gemspec files 2019-07-13 07:25:51 +09:00
Nobuyoshi Nakada 1ee17782e1
Removed binary line 2019-07-13 06:09:33 +09:00
Nobuyoshi Nakada 8745fa2ff0
Default to true when no exception flag [Bug #15987] 2019-07-11 21:05:25 +09:00
Nobuyoshi Nakada f74e23af32
Fixed argument in the fallback function [Bug #15987] 2019-07-11 20:21:50 +09:00
Nobuyoshi Nakada c2723e59c2
Removed wrong argument in the fallback function [Bug #15987] 2019-07-11 20:20:02 +09:00
Nobuyoshi Nakada 3e7d002118
Check exception flag as a bool [Bug #15987] 2019-07-11 20:04:29 +09:00
Nobuyoshi Nakada 1d2ec4b216
Added Etc::VERSION 2019-07-10 12:33:29 +09:00
Nobuyoshi Nakada 612b7b6224
Removed unused files 2019-07-10 12:32:35 +09:00
Nobuyoshi Nakada cc936402eb
C90 for old versions 2019-07-10 03:02:01 +09:00
Nobuyoshi Nakada de4889ce5c
Use the found version number 2019-07-10 02:07:42 +09:00
Nobuyoshi Nakada 9c48472b1e
Removed useless `freeze`s 2019-07-10 01:57:18 +09:00
Nobuyoshi Nakada db844749af
Added StringIO::VERSION 2019-07-10 01:21:05 +09:00
Nobuyoshi Nakada d905ff61e6
Update dependencies 2019-07-09 13:47:07 +09:00
Nobuyoshi Nakada 2a8be8ec33
Suppress uninitialized instance variable warnings 2019-07-09 08:31:27 +09:00
Lourens Naudé 612cad5d20
Let struct dump_config in objspace fit in a single cache line
Let dump_config boolean members roots and full_heap be bit flags
instead

Closes: https://github.com/ruby/ruby/pull/2274
2019-07-08 13:30:21 +09:00
git c07165be1d * expand tabs. 2019-07-03 02:13:25 +09:00
Nobuyoshi Nakada bdddaa9f56
Use rb_ident_hash_new instead of rb_hash_new_compare_by_id
The latter is same as the former, removed the duplicate function.
2019-07-03 02:09:01 +09:00
Nobuyoshi Nakada 99dc885974
Fixed inadvertent ID creation in rb_iv_get 2019-07-01 13:56:55 +09:00
Nobuyoshi Nakada 7b716bc52a
Show the parser states in pretty_print too 2019-06-27 16:58:06 +09:00