summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-28sprintf.c: fix one-off bugnobu
* sprintf.c (rb_str_format): `CHECK` just before `FILL_`, but after another `PUSH`. fix one-off bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27fix ripper prereqnobu
* common.mk (ext/ripper/ripper.c): fix VPATH when out-of-place build, and id.h was created in the build directory too. it has to include the build directory, i.e., the current directory before `cd`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27Send the backtrace of the circular require warning as a single String to ↵eregon
Warning.warn * load.c: send as a single string. * error.c: expose the string formatted by rb_warning as rb_warning_string(). * test/ruby/test_exception.rb: update tests. [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27refactor newhash (revision 58463 another try) [fix GH-1600]shyouhei
* st.c (rb_hash_bulk_insert): new API to bulk insert entries into a hash. Given arguments are first inserted into the table at once, then reindexed. This is faster than inserting things using rb_hash_aset() one by one. This arrangement (rb_ prefixed function placed in st.c) is unavoidable because it both touches table internal and write barrier at once. * internal.h: delcare the new function. * hash.c (rb_hash_s_create): use the new function. * vm.c (core_hash_merge): ditto. * insns.def (newhash): ditto. * test/ruby/test_hash.rb: more coverage on hash creation. * test/ruby/test_literal.rb: ditto. ----------------------------------------------------------- benchmark results: minimum results in each 7 measurements. Execution time (sec) name before after loop_whileloop2 0.136 0.137 vm2_bighash* 1.249 0.623 Speedup ratio: compare with the result of `before' (greater is better) name after loop_whileloop2 0.996 vm2_bighash* 2.004 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27load.c: make fstrings from C strings soonernormal
The underlying string objects will become fstrings anyways, so create the fstring directly from the C string to reduce intermediate garbage. * load.c (rb_provide, rb_provide): create fstring git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26error.c: send as a single stringnobu
* error.c (rb_warn_m): send the arguments as a single string concatenated with a newline, so it can be filtered easily. [ruby-core:80875] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26* 2017-04-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26error.c: improve docsstomar
* error.c: [DOC] fix rdoc formatting (make sure `Warning.warn' is displayed verbatim; rdoc would render it as a link named `#warn'), use capitalized "Ruby", fix a typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26error.c: splat warn argumentsnobu
* error.c (rb_warn_m): print array arguments with splatting. it is often used with `caller`. [ruby-core:80849] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26range.c: remove no longer used variablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25thread_sync.c (rb_mutex_lock): spelling fix [ci skip]normal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Use require to load rbconfig in default.mspeceregon
* Otherwise it would be loaded twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25suppress_warningnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25add timeout.ko1
* test/ruby/test_trace.rb (test_trace_stackoverflow): sometimes this test was stopped forever and killed by test process forcibly. However, this test only checks if this code cause some critical failure such as SEGV. So that we can add timeout for this code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25* 2017-04-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25revert r58478 and r58479 because they do not support not in-place buildko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Use require_relative to load rbconfig in default.mspeceregon
* Otherwise it would load it twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25No need to pass the config file to mspec as mspec finds it itselferegon
* It would also #load (because .mspec cannot be #require'd) it twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Remove useless else which produced a warningeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions of #<=> when initializing a Rangeeregon
* range.c (range_init): no longer hide the user exception with a ArgumentError, just let the user exception go through. * test/ruby/test_range.rb (test_new): add tests. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions of #coerce in Integer#steperegon
* numeric.c (num_step_negative_p): no more error hiding. * test/ruby/test_float.rb, test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25no longer rescue exceptions in numeric comparison operationseregon
* numeric.c (do_coerce): no more error hiding. * test/ruby/test_numeric.rb: follow the change. [Feature #7688] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Import gemspechsbt
Import gemspec and test file from ruby/webrick. * webrick.gemspec: Update files and dependency for standalone gem. * test/webrick/utils.rb: Added explicitly loading of EnvUtil for test suite without ruby core test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Document the Warning module and warn methoderegon
* error.c (Warning): add documentation. [Feature #13504] Author: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25load.c: backtrace of circular requirenobu
* load.c (load_lock): print backtrace of circular require via `Warning.warn` [ruby-core:80850] [Bug #13505] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25Import gemspec and test file changes from ruby/gdbm.hsbt
* gdbm.gemspec: Update basic configuraiton for standalone gdbm gem. * test/gdbm/test_gdbm.rb: In standalone environment, It needs to explicit loading of EnvUtil module for test suite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25* 2017-04-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25fix macro expansion bugshyouhei
This previous "key" macro argument accidentally replaced `(ptr)->key` part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24tool/git-refresh: fix branch operationsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24parse.y: args tail at errornobu
* parse.y (new_args_tail_gen): abandon parsing arguments after error. reported by ilsani Martino Sani (ilsani) at https://hackerone.com/reports/221201 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24parse.y: rb_parser_fatalnobu
* parse.y (rb_parser_fatal): abort compilation on internal parser error. rb_bug() is generic use but not useful for debugging the parser. this function dumps internal states, and continues with enabling yydebug output to stderr for the parser stack dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24Get rid of unnecessary GCC extensionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24revert newhash refactoringshyouhei
We need to fix GC bug before merging this. Revert revisions 58452, 58435, 58434, 58428, 58427 in this order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23* 2017-04-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Allow Net::HTTP to fetch user/pass from http_proxynaruse
Note that this feature is enabled only on environment variables are multi-user safe. In this time the list includes Linux, FreeBSD, or Darwin. [Bug #12921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23suppress warning: shadowing outer local variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Add diagnostic reports section header [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23assert_syntax_error returns the exception [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Document parse.y instead of ext/ripper/ripper.cnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23ext/dl has been removed already [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23use $(srcdir).nobu
* win32/Makefile.sub (enc/jis/props.h): build it in not builddir, but in srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Refactor "%f" % Inf/NaNnobu
* sprintf.c (rb_str_format): as for non-finite float, calculate the exact needed size with the space flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Fix space flag when Inf/NaN and width==3nobu
* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in `" Inf"` and `" Inf"` respectively, `"% 3f"` results in `"Inf"` (no space). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23mark Hash keys correctly.ko1
* hash.c (rb_hash_new_from_object): same as r58434. Newly created frozen objects are not referred from any roots/objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Ignore enc/jis/props.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22* 2017-04-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test/test_prime.rb: update method name in commentstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22parse.y: fix compile_error formatnobu
* parse.y (ripper_compile_error, parser_compile_error): declare as PRINTF_ARGS attribute. * parse.y (id_is_var_gen): fix format specifier for string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test_file_exhaustive.rb: check case-sensitive fsnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e