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
* 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
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 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
* 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
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 (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
* 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
* 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
* 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 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
* 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
* 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
* 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
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
* 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 (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