aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* .travis.yml: allow C99 on pedanticism buidk0kubun2019-01-101-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: check if callablenobu2019-01-103-8/+37
| | | | | | | * proc.c: check the argument at composition, expect a Proc, Method, or callable object. [ruby-core:90591] [Bug #15428] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Get rid of C99 feature for now [ruby-core:90949] [Bug #15519]nobu2019-01-101-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* insns.def (duparray, duphash): add dtrace hookstenderlove2019-01-091-0/+2
| | | | | | | | | They are considered Array and Hash creation events, so allow dtrace (and systemtap) to track those creations. Co-Authored-By: Eric Wong <e@80x24.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2019-01-10svn2019-01-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add setter of iter_lev.ko12019-01-092-4/+16
| | | | | | | | | * hash.c: add special setter function (inc and dec). * internal.h: constify RHash::iter_leve. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: refactor class_instance_method_listnobu2019-01-092-4/+35
| | | | | | | | * class.c (class_instance_method_list): gather singleton and extended methods first separately from ancestors. [ruby-core:90872] [Bug #15501] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: update error message for invalid utc_offsetnobu2019-01-091-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix styles [ci skip]nobu2019-01-098-16/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-01-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Follow behaviour of IO#ungetbytekazu2019-01-092-4/+19
| | | | | | see r65802 and [Bug #14359] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove duplicate macro definitionnobu2019-01-091-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimize zero check for Floatmrkn2019-01-093-2/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2019-01-09svn2019-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mark array as "going to be modified" in `Array#reject!`tenderlove2019-01-082-0/+60
| | | | | | | | | | | Before this patch, if `reject!` is called on a shared array it can mutate the shared array rather than a copy. This patch marks the array as "going to be modified" so that the shared source array isn't mutated. [Bug #15479] [ruby-core:90781] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Check by #name [ruby-core:90853] [Bug #15497]nobu2019-01-081-6/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-01-082-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Defer escaping control char in error messagesnobu2019-01-088-39/+106
| | | | | | | | * eval_error.c (print_errinfo): defer escaping control char in error messages until writing to stderr, instead of quoting at building the message. [ruby-core:90853] [Bug #15497] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Test for "%p" in Time.strptimenobu2019-01-081-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: replace misused UNLIKELY with LIKELYmrkn2019-01-081-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2019-01-08svn2019-01-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c (range_last): disable optimization when each is redefinedmrkn2019-01-082-1/+14
| | | | | | | Do not use the optimized version of Range#last when Range#each is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: support military time zone namesnobu2019-01-072-0/+67
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: UTC and Z timezones should be utcnobu2019-01-072-3/+42
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to date-2.0.0.hsbt2019-01-071-1/+1
| | | | | | I forgot to change it when Ruby 2.6.0 was released. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c (f_divide): canonicalize a quotientmrkn2019-01-072-9/+12
| | | | | | | | | | | Cannonicalize resultant real and imaginary parts when complex number divided by non-complex number. [Fix GH-2065] [Bug #15505] [ruby-core:90891] From: Joe Peric <peric.joe@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Time.strptime benchmarksnobu2019-01-071-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Select ruby to run benchmarks with BENCH_RUBYnobu2019-01-071-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2019-01-07svn2019-01-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: remove needless preludemrkn2019-01-061-2/+0
| | | | | | [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: unify our own stdtbool.h implementationk0kubun2019-01-062-23/+13
| | | | | | | | | | | | | | | because we had another one in missing/stdbool.h as well. Assuming that _Bool does not exist when stdbool.h is absent, I'm in favor of r57462 implementation rather than r61326. Note that Visual Studio 2013 has stdbool.h and thus r57462's commit message is somewhat misleading. This missing/stdbool.h is for Visual Studio 2012 or older, and for Oracle Solaris Studio 12.2 or older because it's added in 12.3 https://docs.oracle.com/cd/E24457_01/html/E21987/gkeza.html. missing/stdbool.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* simplify filename-related codeduerst2019-01-061-1/+1
| | | | | | (Thanks to Nobuyoshi Nakada for the hint!) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add logic to handle Unicode beta period file namesduerst2019-01-061-12/+29
| | | | | | | | | | | | | In downloader.rb, add logic to handle file names of the form UnicodeData-12.0.0d6.txt. To find the right file, we download the index of the directory. Then we download the files by finding the file names from the index. Files are always checked for changes, because changes might be frequent during the beta period. We also check whether any index.html files are left when we are not in the beta period. This would indicate that we might have stale data from the beta period rather than the actual release data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ast.c: argument must be a stringnobu2019-01-062-1/+9
| | | | | | [ruby-core:90904] [Bug #15511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix mday overflownobu2019-01-062-1/+14
| | | | | | [ruby-core:90897] [Bug #15506] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: optimize rb_range_last for int renagemrkn2019-01-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves the performance of Range#last method for a range of integer. This optimization directly computes only required values only in a range instead of converting all values in the range to an array. The optimized implementation is 129-16.7k times faster than the previous one in the benchmark result given below. === Benchmark Result === ``` $ make benchmark ITEM=range_last COMPARE_RUBY=/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby generating known_errors.inc known_errors.inc unchanged /Users/mrkn/src/github.com/ruby/ruby/revision.h unchanged /Users/mrkn/.rbenv/shims/ruby --disable=gems -rrubygems -I/Users/mrkn/src/github.com/ruby/ruby/benchmark/lib /Users/mrkn/src/github.com/ruby/ruby/benchmark/benchmark-driver/exe/benchmark-driver \ --executables="compare-ruby::/Users/mrkn/.rbenv/versions/2.6.0/bin/ruby -I.ext/common --disable-gem" \ --executables="built-ruby::./miniruby -I/Users/mrkn/src/github.com/ruby/ruby/lib -I. -I.ext/common -r/Users/mrkn/src/github.com/ruby/ruby/prelude --disable-gem" \ $(find /Users/mrkn/src/github.com/ruby/ruby/benchmark -maxdepth 1 -name '*range_last*.yml' -o -name '*range_last*.rb' | sort) Warming up -------------------------------------- (1..1_000_000).last(100) 35.600 i/s - 36.000 times in 1.011239s (28.09ms/i) (1..1_000_000).last(1000) 36.204 i/s - 39.000 times in 1.077240s (27.62ms/i) (1..1_000_000).last(10000) 36.470 i/s - 39.000 times in 1.069386s (27.42ms/i) Calculating ------------------------------------- compare-ruby built-ruby (1..1_000_000).last(100) 36.477 609.196k i/s - 106.000 times in 2.905950s 0.000174s (1..1_000_000).last(1000) 35.936 50.350k i/s - 108.000 times in 3.005321s 0.002145s (1..1_000_000).last(10000) 35.641 4.602k i/s - 109.000 times in 3.058233s 0.023685s Comparison: (1..1_000_000).last(100) built-ruby: 609195.7 i/s compare-ruby: 36.5 i/s - 16700.87x slower (1..1_000_000).last(1000) built-ruby: 50349.7 i/s compare-ruby: 35.9 i/s - 1401.08x slower (1..1_000_000).last(10000) built-ruby: 4602.1 i/s compare-ruby: 35.6 i/s - 129.12x slower ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: add benchmark casesmrkn2019-01-061-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix last commit.ko12019-01-051-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refactoring.ko12019-01-051-14/+22
| | | | | | | | | | * hash.c (EQUAL, PTR_EQUAL): make corresponding inline functions ar_equal() and ar_ptr_equal(). * hash.c (SET_*): removed. set fields directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add ar_ prefix for ar_table functions.ko12019-01-051-36/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2019-01-06svn2019-01-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_range.rb: add assertionsmrkn2019-01-051-0/+13
| | | | | | | Add assertions of Range#first and Range#last to examine the type conversion of the arguments and the negative value check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: initialize to suppress false warning.nobu2019-01-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: refactored symbol rulesnobu2019-01-051-18/+11
| | | | | | | | | | * parse.y (symbol): turned into a node, as well as `numeric`, for a symbol literal, and includes `dsym` now. * parse.y (ssym): previous `symbol`. renamed as the counterpart of `dsym`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: hoisted out qcall_branch_start and qcall_branch_endnobu2019-01-051-31/+35
| | | | | | | * compile.c (qcall_branch_start, qcall_branch_end): hoisted out branch coverage traces generation for qcall. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: refine error messagesnobu2019-01-052-1/+8
| | | | | | | * parse.y: refine error messages for tSYMBEG and tSTRING_BEG, which can appear at invalid places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* benchmark/range_last.yml: add a benchmark of Range#lastmrkn2019-01-051-0/+4
| | | | | | [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* separate downloading of Unicode property files and auxiliary filesduerst2019-01-051-1/+13
| | | | | | | | Separate downloading of Unicode property files in ucd and in ucd/auxiliary. This is needed because we need information from separate index.html files to discover the exact file names of property files during a beta period. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix trivial indentation.ko12019-01-051-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* call functions directly.ko12019-01-051-2/+2
| | | | | | | | * hash.c: ar_table only supports `objhash` so we can call compare/hash functions directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e