aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* drop-in type check for rb_define_singleton_method卜部昌平2019-08-293-11/+11
| | | | | | We can check the function pointer passed to rb_define_singleton_method like how we do so in rb_define_method. Doing so revealed many arity mismatches.
* drop-in type check for rb_define_module_function卜部昌平2019-08-292-2/+2
| | | | | | We can check the function pointer passed to rb_define_module_function like how we do so in rb_define_method. The difference is that this changeset reveales lots of atiry mismatches.
* fix arity of bug_start卜部昌平2019-08-291-1/+1
| | | | | This is just a trivial mistake introduced in 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac.
* Revert "Add pipeline operator [Feature #15799]"Nobuyoshi Nakada2019-08-291-1/+0
| | | | | | | | | | | | | This reverts commits: * d365fd5a024254d7c105a62a015a7ea29ccf3e5d * d780c3662484d6072b3a6945b840049de72c2096 * aa7211836b769231a2a8ef6b6ec2fd0ec882ef29 * 043f010c28e82ea38978bf8ed885416f133b5b75 * bb4dd7c6af05c7821d572e2592ea3d0cc748d81f * 043f010c28e82ea38978bf8ed885416f133b5b75 * f169043d81524b5b529f2c1e9c35437ba5bc3a7a http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
* st_foreach now free from ANYARGS卜部昌平2019-08-273-5/+4
| | | | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from st_foreach. I strongly believe that this commit should have had come with b0af0592fdd9e9d4e4b863fde006d67ccefeac21, which added extra parameter to st_foreach callbacks.
* rb_catch now free from ANYARGS卜部昌平2019-08-271-2/+2
| | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_catch, and fixes some bugs revealed by that.
* rb_ensure now free from ANYARGS卜部昌平2019-08-277-16/+30
| | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_ensure, which also revealed many arity / type mismatches.
* rb_rescue / rb_rescue2 now free from ANYARGS卜部昌平2019-08-271-4/+2
| | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_rescue / rb_rescue2, which revealed many arity / type mismatches.
* rb_iterate now takes rb_block_call_func_t卜部昌平2019-08-271-1/+1
| | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit makes rb_iterate free from ANYARGS.
* ext/psych/yaml/api.c: Suppress a "variable set but not used" warningYusuke Endoh2019-08-241-1/+3
| | | | | | | | | | | ``` compiling ../.././ext/psych/yaml/api.c ../.././ext/psych/yaml/api.c: In function 'yaml_document_delete': ../.././ext/psych/yaml/api.c:1122:7: warning: variable 'context' set but not used [-Wunused-but-set-variable] } context; ^~~~~~~ ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190824T093004Z.log.html.gz
* [ruby/stringio] Fixed a typoNobuyoshi Nakada2019-08-231-1/+1
| | | | | | https://github.com/ruby/stringio/commit/b249631c433f800c979be2705bf63555075db2fc#commitcomment-34804150 https://github.com/ruby/stringio/commit/998d6257fb
* Check metadata a bit moreNobuyoshi Nakada2019-08-231-0/+12
|
* Hoisted out get_digest_obj_metadataNobuyoshi Nakada2019-08-231-7/+13
|
* Hoisted out rb_id_metadataNobuyoshi Nakada2019-08-223-4/+8
|
* Hoisted out rb_digest_namespaceNobuyoshi Nakada2019-08-225-12/+11
|
* Separated initializing IDsNobuyoshi Nakada2019-08-211-2/+6
|
* Hoisted out unixsocket_len, triming NUL chars from sun_pathNobuyoshi Nakada2019-08-161-29/+30
|
* [ruby/stringio] Supported BOMNobuyoshi Nakada2019-08-141-0/+81
| | | | https://github.com/ruby/stringio/commit/b249631c43
* [ruby/stringio] Supported `mode:` optionNobuyoshi Nakada2019-08-141-1/+20
| | | | https://github.com/ruby/stringio/commit/53def32ba0
* [ruby/stringio] Allow bignum modeNobuyoshi Nakada2019-08-141-2/+3
| | | | https://github.com/ruby/stringio/commit/d28927b561
* [ruby/stringio] Added support for older versionsNobuyoshi Nakada2019-08-142-0/+56
| | | | | https://github.com/ruby/stringio/commit/c4a13d41cd https://github.com/ruby/stringio/commit/359c9f395c
* [ruby/stringio] stringio: encoding supportNobuyoshi Nakada2019-08-141-27/+20
| | | | https://github.com/ruby/stringio/commit/7b20075ab0
* date_parse.c: trim offNobuyoshi Nakada2019-08-123-13/+10
| | | | | * ext/date/date_parse.c (date_zone_to_diff): trim off by zone name length.
* date_parse.c: avoid copyingNobuyoshi Nakada2019-08-123-51/+120
| | | | | * ext/date/date_parse.c (date_zone_to_diff): get rid of copying the whole argument string.
* Warn instance variable `E`Nobuyoshi Nakada2019-08-101-3/+12
| | | | It is not dumped, as it is a short alias for `:encoding`.
* ext/ripper/lib/ripper/lexer.rb: Consistently use `Array#push`Yusuke Endoh2019-08-071-1/+1
| | | | instead of <<. All the other callsites use `push`.
* ext/ripper/lib/ripper/lexer.rb: fix a wrong delegationYusuke Endoh2019-08-071-1/+1
| | | | The target method name is a typo.
* Remove documentation of %m in SyslogJeremy Evans2019-08-051-4/+0
| | | | Fixes [Bug #6726]
* ext/psych/yaml/loader.c: Cast the difference of pointers to intYusuke Endoh2019-08-051-3/+3
| | | | | instead of casting a pointer to int. Follow up of 39622232c7542d062f79277a11f6b8b6b6cfd994.
* Suppress warnings of bundled libyaml.Hiroshi SHIBATA2019-08-042-4/+4
|
* yaml few build warning fixesDavid Carlier2019-08-041-5/+5
| | | | Closes: https://github.com/ruby/ruby/pull/2283
* Remove dependency on `openssl/conf_api.h`Dmitry Petrashko2019-08-041-1/+0
| | | | | | 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
* ext/-test-/bug-14834/bug-14384.c: fallback for MAYBE_UNUSEDYusuke Endoh2019-08-011-0/+4
| | | | | __unused__ is unavailable on Sun C. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190801T112505Z.fail.html.gz
* fix VC 2013 compile error卜部昌平2019-08-011-2/+2
| | | | | It seems the compiler does not support VLAs. See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
* fix tracepoint + backtrace SEGV卜部昌平2019-08-013-0/+51
| | | | | | | | | | | | 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].
* * expand tabs.git2019-07-311-1/+1
|
* Use 1 byte hint for ar_table [Feature #15602]Koichi Sasada2019-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/io-console] Do not use add_development_dependencyNobuyoshi Nakada2019-07-251-4/+1
| | | | https://github.com/ruby/io-console/commit/bc77f46391
* [ruby/psych] Get rid of C90 featureNobuyoshi Nakada2019-07-251-1/+2
| | | | | | | | | | | | | | | 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
* [ruby/psych] Deduplicate hash keys if they're stringsJean Boussier2019-07-251-1/+23
| | | | https://github.com/ruby/psych/commit/0414982ffd
* [ruby/psych] Drop to support fat gem support.Hiroshi SHIBATA2019-07-251-5/+1
| | | | | | ref. https://github.com/ruby/bigdecimal/pull/149 https://github.com/ruby/psych/commit/25ae263252
* [ruby/psych] Do not use add_development_dependency.Hiroshi SHIBATA2019-07-251-5/+0
| | | | https://github.com/ruby/psych/commit/939754237f
* [ruby/date] Describe what is meant by valid in the Date.valid_date? rdocJeremy Evans2019-07-221-0/+3
| | | | https://github.com/ruby/date/commit/8eca79d1f0
* Constified afamily functionsNobuyoshi Nakada2019-07-161-3/+3
|
* Allow mday in Date.iso8601 to be omittedNobuyoshi Nakada2019-07-161-3/+3
| | | | [Bug #12285]
* catch up e8ddbc0239.Koichi Sasada2019-07-151-2/+2
|
* ext/stringio/stringio.c (strio_read): "binray" is always zero hereYusuke Endoh2019-07-151-1/+1
| | | | Remove unused conditional expression to suppress Coverity Scan warnings.
* Add a /* fall through */ commentYusuke Endoh2019-07-141-0/+1
|
* socket: use frozen string buffer when releasing GVLTanaka Akira2019-07-141-2/+5
| | | | Thanks for the patch by normalperson (Eric Wong) [Bug #14204].
* Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada2019-07-1482-0/+185
|