summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-13test/ruby/test_env.rb: suppress a warningnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13test_process.rb: fix error when empty groupsnobu
* test/ruby/test_process.rb (test_maxgroups): set one element at least get rid of ZeroDivisionError when no process groups. [ruby-core:84224] [Bug #14174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Ripper::Lexer bit predicatesnobu
* ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): added allbits?, anybits? and nobits? methods, as well as Integer. a patch by aycabta. [Feature #14170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13process.c: adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Avoid extra output in test_thread_interrupt_for_killed_threaderegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Revert r61054naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Bump version to etc-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Bump version to csv-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Modify git clone commandhsbt
The previous git clone command is not work, the protocol in URL should be https [fix GH-1772] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13parse.y: Revert r61196yui-knk
* parse.y: Because top_stmts is generated from none (not "/* none */"), @0 is not set by YYLLOC_DEFAULT. So @0 is a meaningless location. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13webrick: compile RE correctly for beginning and end matchnormal
Using ^ and $ in regexps means we can accidentally get fooled by "%0a" in HTTP request paths being decoded to newline characters. Use \A and \z to match beginning and end-of-string respectively, instead. Thanks to mame and hsbt for reporting. * lib/webrick/httpserver.rb (MountTable#compile): use \A and \z instead of ^ and $ * lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $ * test/webrick/test_httpserver.rb (test_cntrl_in_path): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12parse.y: Fix the locations of an empty scriptyui-knk
* parse.y: Fix the locations of NODE_BEGIN in an empty script. ``` ruby --dump=p -e '' ``` * Before ``` NODE_BEGIN (line: 1, code_range: (1,1)-(1,1)) ``` * After ``` NODE_BEGIN (line: 1, code_range: (1,0)-(1,0)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Capture the values of globals in EnvUtil to restore to the originaleregon
* Avoids the thread-safety issues mentioned in r61192, when thread concurrently modify default Encodings or $VERBOSE. Their state will always be the original one once the test finishes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Revert r61192 and r61193eregon
* More general fix coming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Use EnvUtil.with_default_external in tests needing iteregon
* Reverts part of r54522. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Do not change Encoding.default_internal in assert_raise_with_messageeregon
* It is not thread-safe: if two threads call it concurrently, the default_internal Encoding might not be restored, which causes many problems. The same applies for $VERBOSE, which might also not be restored to its original value but to the new value instead. This happens because reading the original value might capture the value already changed by EnvUtil.with_default_internal in another Thread. One solution could be to capture the value of these globals before running the test. * Reverts part of r54522. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Check that global encodings are not changed in test-alleregon
* Check that Encoding.default_internal and Encoding.default_external are the same before and after every test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Remove useless assertion in TestThread#test_handle_interrupt_blockingeregon
* It was originally th.join(0.2), but th.join never returns nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Handle exception explicitly in TestBignum#test_interrupt_during_to_seregon
* Otherwise it produces a warning with Thread.report_on_exception=true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Fix test-all tests to avoid creating report_on_exception warningseregon
* The warnings are shown by Thread.report_on_exception defaulting to true. [Feature #14143] [ruby-core:83979] * Improves tests by narrowing down the scope where an exception is expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Remove extra assert_nil in Rinda testseregon
* They are never executed since thread_join() raises. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Fix tests which fail with extra stderr output when a Thread dieseregon
* [Feature #14143] [ruby-core:83979]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215eregon
* test/rinda/test_rinda.rb (test_take_bug_8215): add rescue for expected exception, which removes the warning by Thread.report_on_exception [Feature #14143]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Avoid creating a Thread for shutting down a DRbServereregon
* lib/drb/drb.rb: avoid creating a Thread and call the shutdown logic directly. Do not try to kill or join the current Thread. Thread.new { stop_service } caused "can't alloc thread (ThreadError)", which is shown with Thread.report_on_exception = true. [Bug #14171] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Set Thread.report_on_exception=true by default to report exceptions in Threadseregon
* [Feature #14143] [ruby-core:83979] * vm.c (vm_init2): Set Thread.report_on_exception to true. * thread.c (thread_start_func_2): Add indication the message is caused by report_on_exception = true. * spec/ruby: Specify the new behavior. * test/ruby/test_thread.rb: Adapt and improve tests for Thread.report_on_exception and Thread#report_on_exception. * test/ruby/test_thread.rb, test/ruby/test_exception.rb: Unset report_on_exception for tests expecting no extra output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12struct.c: don't explain implementation detailsk0kubun
of keyword_init option. [DOC] [ci skip] It's implemented to take Hash, but it's just implementation detail and it's intended to behave in the same way as keyword arguments (for :keyword_init option too). Also I unified coding style of r61137 with other places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12struct.c: show `keyword_init: true` on inspectk0kubun
for debugging if it's specified for the Struct class. This follows up r61137. We don't provide a method to check it because I don't think of any use case, but showing this to inspect would be helpful for debugging if someone is debugging whether keyword_init is properly enabled or not. In this commit, I didn't show `keyword_init: false` because of backward compatibility. Ideally any application should not depend on the behavior of inspect, but I don't have strong motivation to break it too. [close GH-1773] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12set ino at `File.lstat` on Windowsusa
* win32/win32.c (winnt_stat): support symbolic link and others. * win32/win32.c (w32_stati128, wstati128, name_for_stat, rb_w32_{,ul}stati128, wutimensat): follow above change. [Feature #14169] From: Takehiro Kubo kubo@jiubao.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Add more example of `Enumerable#one?` [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12pattern and modulo are not keyword argument [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12atime,mtime,ctime of File::Stat are instance methodskazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Remove unnecessary `:`kazu
Before: `.../irb/init.rb:280: warning: :LoadError: cannot load such file -- hoge` After: `.../irb/init.rb:280: warning: LoadError: cannot load such file -- hoge` [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Use printf instead of puts and sprintfkazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12* 2017-12-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12[DOC] Process.last_status may return nilkazu
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12parse.y: Change the last location of noneyui-knk
* parse.y: Change the last location of none to be equal to the first location of none. Sometimes none has length (`parser->tokp` does not match `lex_p` when none is generated). This leads to invalid code_ranges. e.g. The locations of the NODE_CALL (:sort) is fixed: ``` x.sort.join(" ") ``` * Before ``` NODE_CALL (line: 1, code_range: (1,0)-(1,7)) ``` * After ``` NODE_CALL (line: 1, code_range: (1,0)-(1,6)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12parse.y: Set locations of nd_body in NODE_ITER explicitlyyui-knk
* parse.y: Same as r61168, but for brace_block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Revert "switch from http to https for Unicode data file downloads"hsbt
This reverts commit 90de118a75921a08497b41de2950971073b3c924. The environment of mswinci couldn't handle https download. (It's certificates problem, We should upgrade its environment) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12parse.y: Set locations of nd_body in NODE_ITER explicitlyyui-knk
* parse.y: Currently the location of do_body is set by new_do_body. Sometimes the last part of do_body is none, because bodystmt ends with opt_ensure. Token keyword_end has been looked ahead when a tokenizer generates none, so the last location of opt_ensure matches the last location of `end`. But this relation will be broken when we change the last location of none to be equal to the first location of none. So set locations of nd_body in NODE_ITER explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12irb/test_init.rb: add test to ensure $0k0kubun
is not changed. At first `ARGV.unshift('something')` was suggested for r61149, but it wasn't sufficient because it modifies $0. Not only to preserve ARGV, but also r61149 intends to preserve $0. This test prevents future breakage of the behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12test_struct.rb: rename constants to clarifyk0kubun
the intention. Follows up r61137. They were forgotten to be renamed when :keyword_args is renamed to :keyword_init. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12ext/coverage/coverage.c: Add test casesyui-knk
* ext/coverage/coverage.c (test_method_coverage_for_define_method): Add test cases for method coverages which test do-end block define_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12NEWS: polishsorah
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12ignore lines (to catch up r61155).ko1
* spec/ruby/library/net/ftp/return_code_spec.rb: check message body only. * spec/ruby/library/net/http/http/set_debug_output_spec.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12error.c(rb_error_write): Remove ec_ from its namesorah
It's unrelated to rb_execution_context_t during writing the patch r61154 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12NEWS for Method#===a_matsuda
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Unneeded assertiona_matsuda
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12Add Method#=== that invokes #calla_matsuda
Patch by osyo via [Feature #14142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e