aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* variable.c: cleanup waitq upon thread deathnormal2017-05-073-8/+57
| | | | | | | | | | | | | * variable.c (autoload_reset): use idempotent list_del_init (autoload_sleep): moved code from rb_autoload_load (autoload_sleep_done): cleanup for use with rb_ensure (rb_autoload_load): ensure list delete happens in case the thread dies during sleep * test/ruby/bug-13526.rb: new script for separate execution * test/ruby/test_autoload.rb (test_bug_13526): new test [ruby-core:81016] [Bug #13526] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make Integer#{round,floor,ceil,truncate} always return integerstomar2017-05-062-36/+32
| | | | | | | | | | | | | | | * numeric.c (int_round): return integer (self) instead of float for Integer#round with positive ndigits argument, because conversion to float introduces errors for large integers. * numeric.c (int_floor): ditto for Integer#floor. * numeric.c (int_ceil): ditto for Integer#ceil. * numeric.c (int_truncate): ditto for Integer#truncate. * test/ruby/test_integer.rb: adjust test cases and add some more. [ruby-core:80645] [Bug #13420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-05-07svn2017-05-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/lexer.rb: nested indented heredocnobu2017-05-063-1/+20
| | | | | | | | | * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert stripped leading spaces as `on_ignored_sp` elements, so that the original source can be reconsructed. [ruby-core:80977] [Bug #13536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix up r58573nobu2017-05-061-1/+1
| | | | | | | * common.mk: make the directory for extension shared library with the timestamp directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: improve docs for Math.sqrtstomar2017-05-061-1/+1
| | | | | | * math.c: [DOC] mention Integer.sqrt in docs for Math.sqrt. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: remove mention of Bignum from docsstomar2017-05-061-9/+8
| | | | | | | * numeric.c: [DOC] remove mention of Bignum from Integer#{+,-,*,/}, the return type does not depend on magnitude anymore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: revise docsstomar2017-05-061-291/+257
| | | | | | | | | | | | * numeric.c: [DOC] revise docs for Numeric, Integer, Float: * nodoc Numeric#singleton_method_added * mention that result for Integer#** might also be Complex * add / simplify / fix some examples * mention aliases * fix rdoc formatting, typos, grammar * clarifications and other improvements git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete enc/prelude.rb, because no longer neededduerst2017-05-061-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* delete lib/unicode_normalize.rb, because no longer neededduerst2017-05-061-11/+0
| | | | | | (all content has been moved to string.c) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove enc/prelude.rb from list of prelude files in common.mkduerst2017-05-061-1/+1
| | | | | | | | (This is a retry of r58559, it should work now that rubyspec does no longer check for unicode_normalized to be required. See also https://github.com/ruby/spec/commit/41176ead68b14011658c8abd0ebd67df2ae632fb.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* share `@@accept_charset`nobu2017-05-063-2/+17
| | | | | | | | * lib/cgi/{core,util}.rb: include CGI::Util not only extending, to share `@@accept_charset` class variable, so that it is always accessible. [ruby-core:80986] [Bug #13539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix typesnobu2017-05-061-3/+3
| | | | | | | | | * string.c (id_normalize, id_normalized_p): fix types, IDs should be ID. * string.c (unicode_normalize_common): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-05-06svn2017-05-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* timestamp for extensionsnobu2017-05-061-4/+4
| | | | | | | * common.mk: use the same timestamp file for architecture specific directory as the file used in Makefiles under ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-05-05svn2017-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/bm_vm_thread_pass_flood.rb: add commentnormal2017-05-041-0/+2
| | | | | | | | | | | | | I was about to write off this benchmark while working on GVL improvements on multi-core systems. However I noticed it exposes a weakness in my work-in-progress code when I tested on an old single CPU system. Further testing reveals setting CPU affinity ("schedtool -a 0x1" on Linux) on a modern multi-core system is enough to reproduce the problem exposed by this benchmark. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: avoid taking a pointer to a member of packed structmame2017-05-041-7/+23
| | | | | | | | clang 4.0.0 emitted a warning: "taking address of packed member 'subsecx' of class or structure 'vtm' may result in an unaligned pointer value [-Waddress-of-packed-member]". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: [DOC] improve docs for String.newstomar2017-05-041-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h (rb_gc_resurrect): remove stale declarationktsj2017-05-041-2/+0
| | | | | | rb_gc_resurrect is no longer defined since r47444. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: [DOC] Properly refer to keyword argument by its namektsj2017-05-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c: [DOC] Properly refer to keyword argument by its name [Fix GH-1543]ktsj2017-05-041-4/+4
| | | | | | | | | | | | enc is the name of the variable used in the example, not the name of the keyword argument (encoding). The documentation used to wrongly suggest that the keyword argument name was "enc" which could cause people try try to call `Dir.open("thing", enc: "utf-8")` Author: Olivier Lacan <hi@olivierlacan.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/bm_vm1_gc_wb_*.rb: fix GC.start args for invalid keywordnormal2017-05-044-4/+4
| | | | | | | | | | | | | | | | | | "lazy_sweep" does not appear to have ever been a valid kwarg for GC.start, however the opposite of "lazy_sweep" appears to be "immediate_sweep". So use immediate_sweep, and flip the boolean value of each arg. I guess this only started failing with r56981 in Dec 2016 ("class.c: missing unknown_keyword_error", commit e3f0cca2f26ba44c810ac980cdff7dda129ae533) * benchmark/bm_vm1_gc_wb_ary.rb: "lazy_sweep: false" => "immediate_sweep: true" * benchmark/bm_vm1_gc_wb_ary_promoted.rb: ditto * benchmark/bm_vm1_gc_wb_obj.rb: ditto * benchmark/bm_vm1_gc_wb_obj_promoted.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gems/bundled_gems: Update to power_assert 1.0.2ktsj2017-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gitignore: ignore benchmark/bm_require.datanormal2017-05-041-0/+1
| | | | | | | | Followup-to r58562 in SVN * .gitignore: ignore benchmark/bm_require.data git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: ignore bm_require.data/normal2017-05-040-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: make shared string modifiablenobu2017-05-042-1/+15
| | | | | | | | * parse.y (dedent_string): ensure that the string is modifiable, not to set the length of shared string. [ruby-core:80987] [Bug #13540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert 58559, because it fails on travis (rubyspec problem)duerst2017-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove enc/prelude.rb from list of prelude files in common.mkduerst2017-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refactor common parts of unicode normalization functions into ↵duerst2017-05-041-31/+20
| | | | | | | | | | | unicode_normalize_common In string.c, refactor the common parts (requiring of unicode_normalize/normalize.rb, check of number of arguments) of the unicode normalization functions (rb_str_unicode_normalize, rb_str_unicode_normalize_bang, rb_str_unicode_normalized_p) into the new function unicode_normalize_common. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-05-040-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark: new single-threaded read/write benchmark with pipenormal2017-05-041-0/+13
| | | | | | | | | | | This is currently for testing GVL performance in the uncontended case: IO#write and IO#read unconditionally release GVL for blocking I/O with pipe. It will also be interesting to see how this changes if we switch to M:N threading model. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move definition of String#unicode_normalized? to C to make sure it is documentedduerst2017-05-043-30/+38
| | | | | | | | | | | | * lib/unicode_normalize.rb: Remove definition of String#unicode_normalized? (including documentation). Leave a comment explaining that the file is now empty. * string.c: Define String#unicode_normalized? in rb_str_unicode_normalized_p in C, (including documentation) * lib/unicode_normalize/normalize.rb: Remove (re)definition of String#unicode_normalized? to avoid warnings (when $VERBOSE==true) and problems when String is frozen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-05-04svn2017-05-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move definition of String#unicode_normalize! to C to make sure it is documentedduerst2017-05-043-17/+23
| | | | | | | | | | | | * lib/unicode_normalize.rb: Remove definition of String#unicode_normalize! (including documentation) * string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C, (including documentation) * lib/unicode_normalize/normalize.rb: Remove (re)definition of String#unicode_normalize! to avoid warnings (when $VERBOSE==true) and problems when String is frozen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rss: Accept empty text element as valid elementkou2017-05-032-1/+25
| | | | | | | | | | | Parser has been accepted it but XML serializer wasn't accepted. Reported by stefano frabetti. Thanks!!! [ruby-core:80965] [Bug #13531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2017-05-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move definition of String#unicode_normalize to C to make sure it is documentedduerst2017-05-033-30/+48
| | | | | | | | | | | | * lib/unicode_normalize.rb: Remove definition of String#unicode_normalize (including documentation) * string.c: Define String#unicode_normalize in rb_str_unicode_normalize in C, (including documentation) * lib/unicode_normalize/normalize.rb: Remove (re)definition of String#unicode_normalize to avoid warnings (when $VERBOSE==true) and problems when String is frozen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/imap: handle timeoutsshugo2017-05-031-6/+49
| | | | | | Patch by Pavel Rosický. [Feature #13379] [ruby-core:80440] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `dd` instead of `head -c`kazu2017-05-031-1/+1
| | | | | | [Bug #13538] [ruby-dev:50106] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58548 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
* * 2017-05-03svn2017-05-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ripper/lexer.rb: nested indented heredocnobu2017-05-022-1/+25
| | | | | | | | * ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for nested indedented here documents, where `Elem`s are nested too. [ruby-core:80977] [Bug #13536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .travis.yml: tweek after-updatenobu2017-05-021-1/+1
| | | | | | | * .travis.yml (before_script): get rid of making miniruby at after-update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkconfig.rb: remove cross_compilingnobu2017-05-022-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: BOOTSTRAPRUBY for enc.mknobu2017-05-021-1/+1
| | | | | | | * common.mk ($(ENC_MK)): use $(BOOTSTRAPRUBY) as well as $(RBCONFIG), instead of $(MINIRUBY). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58542 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
* internal.h: rb_raise_staticnobu2017-05-022-3/+8
| | | | | | | * internal.h (rb_raise_static): raise with a static message string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unnecessary conditions in lib/unicode_normalize.rbduerst2017-05-021-3/+3
| | | | | | | | | Because the methods in lib/unicode_normalize.rb are overwritten by those in lib/unicode_normalize/normalize.rb as soon as one of them is called, the check for whether UnicodeNormalized is defined or not is no longer necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rework definition of String#unicode_normalize! and #unicode_normalized?duerst2017-05-022-5/+10
| | | | | | | | simplify String#unicode_normalize! and #unicode_normalized? in lib/unicode_normalize.rb by redefining them in lib/unicode_normalize/normalize.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e