aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add uplevel keyword to Kernel#warn and use itshyouhei2017-12-1232-63/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If uplevel keyword is given, the warning message is prepended with caller file and line information and the string "warning: ". The use of the uplevel keyword makes Kernel#warn format output similar to how rb_warn formats output. This patch modifies net/ftp and net/imap to use Kernel#warn instead of $stderr.puts or $stderr.printf, since they are used for printing warnings. This makes lib/cgi/core and tempfile use $stderr.puts instead of warn for debug logging, since they are used for debug printing and not for warning. This does not modify bundler, rubygems, or rdoc, as those are maintained outside of ruby and probably wish to remain backwards compatible with older ruby versions. rb_warn_m code is originally from nobu, but I've changed it so that it only includes the path and lineno from uplevel (not the method), and also prepends the string "warning: ", to make it more similar to rb_warn. From: Jeremy Evans code@jeremyevans.net Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c(exc_full_message): Exception#full_messagesorah2017-12-124-53/+109
| | | | | | | | | Add a method to retrieve a String expression of an exception, formatted in the same way that Ruby prints an uncaught exception out. [Feature #14141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unused variableusa2017-12-121-1/+0
| | | | | | | thanks kubo-san. c.f. [ruby-dev:50345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS entry for FrozenError [Feature #13224]shyouhei2017-12-121-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb/init.rb: make sure ARGV refers to toplevel onek0kubun2017-12-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-12-120-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: preserve ARGV on binding.irbk0kubun2017-12-123-16/+41
| | | | | | | | | | | | | | | This is not perfectly good solution (at least we don't want to have ARGV as default value of `argv` argument), but unfortunately IRB.setup and IRB.parse_opts are public methods and we can't make breaking change to those methods. We may deprecate using them and then make them private in the future, but the removal should not be in Ruby 2.5. So I kept their interface for now. [Bug #14162] [close GH-1770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to fileutils-1.0.1.hsbt2017-12-121-1/+7
| | | | | | | Update source code url metadata on rubygems.org. [Feature #13197][ruby-core:79455] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Integer#allbits?, Integer#anybits?, Integer#nobits? [Feature #12753]naruse2017-12-123-0/+67
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to fileutils-1.0.0 as default gems.hsbt2017-12-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* switch from http to https for Unicode data file downloadsduerst2017-12-121-1/+1
| | | | | | (patch from MSP-Greg (Greg L), this closes issue #13962) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: mention Process.last_statusmrkn2017-12-121-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: add Process.last_statusmrkn2017-12-122-0/+27
| | | | | | | | | | * process.c (proc_s_last_status): add Process.last_status [ruby-core:83514] [Feature #14043] * test/ruby/test_process.rb (test_last_status): add a test case for Process.last_status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix the locations of NODE_ITER (cmd_brace_block)yui-knk2017-12-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | * parse.y: Update the locations of NODE_ITER when nd_iter is determined. ``` a (1) {|i|} ``` * Before ``` NODE_ITER (line: 1, code_range: (1,6)-(1,10)) ``` * After ``` NODE_ITER (line: 1, code_range: (1,0)-(1,11)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mention support of emoji-related Unicode character properties in NEWSduerst2017-12-121-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-12-120-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Ignore gemspec under the lib directory for documentation.hsbt2017-12-122-0/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: add entry for r61137k0kubun2017-12-121-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: add keyword_init option to Struct.newk0kubun2017-12-123-11/+92
| | | | | | | | to initialize struct with keyword arguments. [Feature #11925] [close GH-1771] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2017-12-120-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces, append newline at EOF.svn2017-12-122-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge 1-16-stable branch of bundler.hsbt2017-12-1225-58/+226
| | | | | | | It's rc version for bundler-1.16.1. I'm going to update it version after official release from bundler team. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix locations of NODE_ARRAY of mlhs_headyui-knk2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: Fix to only include a range of mlhs_item (exclude ',' form range). e.g. The locations of the NODE_ARRAY is fixed: ``` (a,) = 1,2 ``` * Before ``` NODE_ARRAY (line: 1, code_range: (1,1)-(1,3)) ``` * After ``` NODE_ARRAY (line: 1, code_range: (1,1)-(1,2)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* catch up r61131.ko12017-12-121-2/+2
| | | | | | | * spec/ruby/core/kernel/autoload_spec.rb: should use FrozenError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add FrozenError as a subclass of RuntimeErrorshyouhei2017-12-1229-89/+97
| | | | | | | | | | | | | | FrozenError will be used instead of RuntimeError for exceptions raised when there is an attempt to modify a frozen object. The reason for this change is to differentiate exceptions related to frozen objects from generic exceptions such as those generated by Kernel#raise without an exception class. From: Jeremy Evans <code@jeremyevans.net> Signed-off-by: Urabe Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix locations of NODE_ARRAY in NODE_CALL(:=~)yui-knk2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * parse.y (match_op_gen): Fix to only include a range of node2. e.g. The locations of the NODE_ARRAY is fixed: ``` re =~ s1 ``` * Before ``` NODE_ARRAY (line: 1, code_range: (1,0)-(1,8)) ``` * After ``` NODE_ARRAY (line: 1, code_range: (1,6)-(1,8)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODEmame2017-12-124-10/+4
| | | | | | A NEWS entry is also added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix locations of NODE_ARRAY of opt_call_argsyui-knk2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: Fix to only include a range of assocs (exclude ',' form range). e.g. The locations of the NODE_ARRAY is fixed: ``` m1(str: "bar",) ``` * Before ``` NODE_ARRAY (line: 1, code_range: (1,3)-(1,14)) ``` * After ``` NODE_ARRAY (line: 1, code_range: (1,3)-(1,13)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: add changes for Matrix [ci-skip] [doc]marcandre2017-12-111-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix locations of NODE_ARRAY in NODE_BLOCK_PASSyui-knk2017-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * parse.y: Fix to only include a range of assocs. e.g. The locations of the NODE_ARRAY is fixed: ``` m1(str: "bar", &blk) ``` * Before ``` NODE_ARRAY (line: 1, code_range: (1,3)-(1,19)) ``` * After ``` NODE_ARRAY (line: 1, code_range: (1,3)-(1,13)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a method nameyui-knk2017-12-111-1/+1
| | | | | | | * test/ruby/test_optimization.rb (test_fixnum_ge): Fix a method name to suppress method redefinition warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Change locations of NODE_DVAR in NODE_MASGNyui-knk2017-12-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: Change the last location of NODE_DVAR to be equal to the first location of NODE_DVAR. NODE_DVAR of NODE_MASGN (nd_value) is an internal variable, so it has no length. e.g. The locations of the NODE_DVAR is changed: ``` a.b {|(c,d)| e} ``` * Before ``` NODE_DVAR (line: 1, code_range: (1,7)-(1,10)) ``` * After ``` NODE_DVAR (line: 1, code_range: (1,7)-(1,7)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove vm_opt_binop_dispatch().ko12017-12-112-97/+191
| | | | | | | | | | | | | * vm_insnhelper.c (vm_opt_binop_dispatch): removed because this function has several issues for micro-benchmark. Write conditions manually. The worst point is that we can't control value checking order. For example, we can assume FIXNUM arithmetic operations are most popular in Ruby, so that we need to check FIXNUM at first. * test/ruby/test_optimization.rb: also fix redef bug for LE/GT/GE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* do not disable `trace_` prefix insns.ko12017-12-115-50/+65
| | | | | | | | | | | | | | | | * vm.c: introduce `ruby_vm_event_enabled_flags` which represents which event flags are enabled before. * vm_trace.c: do not turn off `trace_` prefix instructions because turn on overhead is a matter if a program repeats turn on and turn off frequently. * iseq.c (finish_iseq_build): respect `ruby_vm_event_enabled_flags`. * vm_insnhelper.c (vm_trace): check `ruby_vm_event_flags` and disable lazy trace-off technique (do not disable traces). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed typousa2017-12-111-2/+2
| | | | | | | * win32/win32.c (get_ino): forgotten to specify the member. thanks kubo-san. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_exec.h: introduce macros for abstarction.ko12017-12-112-5/+11
| | | | | | | | | | | | | | * vm_exec.h: declare two macros * START_OF_ORIGINAL_INSN() * DISPATCH_ORIGINAL_INSN() instead of inserting label and goto lines. For OPT_CALL_THREADED_CODE, first macro is empty and second macro is simply call the original insn function. * tool/instruction.rb: use above macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* undef previous definition of `SIZEOF_STRUCT_STAT_ST_INO`usa2017-12-111-0/+1
| | | | | | | trying to solve build problem of MinGW. see [Bug #14165] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-12-12svn2017-12-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update test-unit to 3.2.7kou2017-12-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extern rb_time_utc_offset to get utc offsetnaruse2017-12-112-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to zlib-1.0.0 as default gems.hsbt2017-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to scanf-1.0.0 as default gems.hsbt2017-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to sdbm-1.0.0 as default gems.hsbt2017-12-111-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to fcntl-1.0.0 as default gems.hsbt2017-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/pp.rb: remove alias for suppressing a redefinition warning.mame2017-12-111-4/+0
| | | | | | Because there is now the same guard in prelude.rb (alias pp pp). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to date-1.0.0 as default gems.hsbt2017-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to cmath-1.0.0 as default gems.hsbt2017-12-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bccwin is no longer supportedusa2017-12-111-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* depend on win32.h on Windowsusa2017-12-111-1/+4
| | | | | | | * lib/mkmf.rb (depend_rules): all objs should depend on win32.h on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: Fix locations of NODE_DSTR generated by evstr2dstr_genyui-knk2017-12-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | * parse.y (evstr2dstr_gen): Fix to only include a range of node. e.g. The locations of the NODE_DSTR is fixed: ``` %W[a #{b} c] ``` * Before ``` NODE_DSTR (line: 1, code_range: (1,3)-(1,9)) ``` * After ``` NODE_DSTR (line: 1, code_range: (1,5)-(1,9)) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e