aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Implement String#undump to unescape String#dump-ed stringtadd2017-12-143-17/+320
| | | | | | [Feature #12275] [close GH-1765] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.h: add nd_last_loc and nd_set_last_locmame2017-12-142-12/+8
| | | | | | Just refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Thread.current.report_on_exception = falseusa2017-12-141-0/+3
| | | | | | | | * test/win32ole/test_win32ole.rb: set report_on_exception = false in threads which are expected to be throw some exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use string instead of regexpnaruse2017-12-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.[ch], parse.y, compile.c: rename nd_column to nd_first_columnmame2017-12-144-38/+38
| | | | | | | | nd_set_column -> nd_first_set_column nd_lineno -> nd_first_lineno nd_set_lineno -> nd_first_set_lineno git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: suppress "unused variable" warning of ripper.ymame2017-12-141-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prelude.rb: remove duplicate rdocnobu2017-12-141-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bigdecimal: dependencynobu2017-12-141-7/+9
| | | | | | | * ext/bigdecimal/extconf.rb: extconf.h depends on the gemspec file. [ruby-core:84247] [Bug #14180] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: Upgrade the did_you_mean gem to 1.2.0yuki2017-12-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added `test-bundler` and `test-bundled-gems` to `make help` entries`.hsbt2017-12-141-28/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow empty path components in a URI [Bug #8352]knu2017-12-143-3/+13
| | | | | | | | | | | * generic.rb (URI::Generic#merge, URI::Generic#route_to): Fix a bug where a sequence of slashes in the path part gets collapsed to a single slash. According to the relevant RFCs and WHATWG URL Standard, empty path components are simply valid and there is no special treatment defined for them, so we just keep them as they are. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c: dump type of branchiftype on disasmk0kubun2017-12-133-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes easier to debug scripts related to r59950. * before $ ./ruby --dump=insns -e '"#{a}"' == disasm: #<ISeq:<main>@-e>============================================ 0000 putobject "" ( 1)[Li] 0002 putself 0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache> 0006 dup 0007 branchiftype 5, 15 0010 dup 0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache> 0014 tostring 0015 concatstrings 2 0017 leave * after $ ./ruby --dump=insns -e '"#{a}"' == disasm: #<ISeq:<main>@-e>============================================ 0000 putobject "" ( 1)[Li] 0002 putself 0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache> 0006 dup 0007 branchiftype T_STRING, 15 0010 dup 0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache> 0014 tostring 0015 concatstrings 2 0017 leave git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Document how to deal with output created by Thread.report_on_exception.eregon2017-12-131-16/+42
| | | | | | | * Improve and clarify the documentation of Thread.report_on_exception and related methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: bigdecimal 1.3.3mrkn2017-12-131-0/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-12-14svn2017-12-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bigdecimal: version 1.3.3mrkn2017-12-138-291/+398
| | | | | | | | Import bigdecimal version 1.3.3. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.2...v1.3.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Fix exception class [ci skip]kazu2017-12-131-2/+2
| | | | | | ref https://github.com/rurema/doctree/pull/816 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vcs.rb: raise NotFoundError when command not foundnobu2017-12-131-0/+2
| | | | | | | * tool/vcs.rb (VCS#get_revisions): raise VCS::NotFoundError when command not found. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Travis: the workaround needs sudo: required to workeregon2017-12-131-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use the older Travis CI imageeregon2017-12-131-0/+3
| | | | | | | | * The new one produces many warnings like: warning: Insecure world writable dir /usr/local/clang-5.0.0/bin in PATH, mode 040777 * Workaround from https://blog.travis-ci.com/2017-12-12-new-trusty-images-q4-launch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: typo [DOC] [ci skip]sorah2017-12-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_env.rb: suppress a warningnobu2017-12-131-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_process.rb: fix error when empty groupsnobu2017-12-131-0/+1
| | | | | | | | * 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
* Ripper::Lexer bit predicatesnobu2017-12-131-0/+3
| | | | | | | | * 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
* process.c: adjust indentnobu2017-12-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Avoid extra output in test_thread_interrupt_for_killed_threaderegon2017-12-131-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r61054naruse2017-12-131-45/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to etc-1.0.0 as default gems.hsbt2017-12-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to csv-1.0.0 as default gems.hsbt2017-12-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Modify git clone commandhsbt2017-12-131-1/+1
| | | | | | | 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
* parse.y: Revert r61196yui-knk2017-12-131-1/+1
| | | | | | | * 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
* webrick: compile RE correctly for beginning and end matchnormal2017-12-132-2/+27
| | | | | | | | | | | | | | | | 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
* parse.y: Fix the locations of an empty scriptyui-knk2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Capture the values of globals in EnvUtil to restore to the originaleregon2017-12-122-20/+24
| | | | | | | | * 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
* Revert r61192 and r61193eregon2017-12-123-14/+11
| | | | | | * More general fix coming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use EnvUtil.with_default_external in tests needing iteregon2017-12-122-5/+11
| | | | | | * Reverts part of r54522. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Do not change Encoding.default_internal in assert_raise_with_messageeregon2017-12-121-6/+3
| | | | | | | | | | | | | | * 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
* Check that global encodings are not changed in test-alleregon2017-12-121-1/+23
| | | | | | | * 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
* Remove useless assertion in TestThread#test_handle_interrupt_blockingeregon2017-12-121-1/+1
| | | | | | * 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
* Handle exception explicitly in TestBignum#test_interrupt_during_to_seregon2017-12-121-3/+5
| | | | | | * 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
* Fix test-all tests to avoid creating report_on_exception warningseregon2017-12-1219-148/+181
| | | | | | | | | * 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
* Remove extra assert_nil in Rinda testseregon2017-12-121-3/+2
| | | | | | * 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
* Fix tests which fail with extra stderr output when a Thread dieseregon2017-12-122-6/+11
| | | | | | * [Feature #14143] [ruby-core:83979]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Rescue expected Interrupt in TupleSpaceTestModule#test_take_bug_8215eregon2017-12-121-0/+2
| | | | | | | | * 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
* Avoid creating a Thread for shutting down a DRbServereregon2017-12-121-9/+14
| | | | | | | | | | * 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
* Set Thread.report_on_exception=true by default to report exceptions in Threadseregon2017-12-125-17/+42
| | | | | | | | | | | | | | * [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
* struct.c: don't explain implementation detailsk0kubun2017-12-121-4/+8
| | | | | | | | | | | | 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
* struct.c: show `keyword_init: true` on inspectk0kubun2017-12-122-0/+13
| | | | | | | | | | | | | | | | | 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
* set ino at `File.lstat` on Windowsusa2017-12-121-103/+24
| | | | | | | | | | | | | * 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
* Add more example of `Enumerable#one?` [ci skip]kazu2017-12-121-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e