Граф коммитов

70297 Коммитов

Автор SHA1 Сообщение Дата
Victor Shepelev a0f10a973f
[DOC] Add documentation for hash value omission syntax 2021-12-20 01:09:52 +09:00
Chris AtLee 1dd10e1892
[DOC] Add documentation for Random.rand and Random.seed 2021-12-20 00:50:46 +09:00
git 12ad53f41f * 2021-12-20 [ci skip] 2021-12-20 00:37:20 +09:00
Burdette Lamar f44367effe
[DOC] Addition to IO introduction (#5299)
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-12-19 09:37:06 -06:00
Kazuhiro NISHIYAMA ae58b71eeb
Sort URLs by issue numbers [ci skip] 2021-12-19 23:43:39 +09:00
Kazuki Tsujimoto 3f2b581840
Add news about allowing omission of parentheses in one-line pattern matching 2021-12-19 21:37:08 +09:00
Nobuyoshi Nakada e2ec97c4b8
[DOC] How to get the longest last match [Bug #18415] 2021-12-19 20:27:31 +09:00
Kaíque Kandy Koga 0eb1c4ea3a [ruby/irb] Add information about --extra-doc-dir option in the comments
https://github.com/ruby/irb/commit/ac3d4b9e79
2021-12-19 20:26:29 +09:00
Samuel Williams 56811617ab Improve IO::Buffer resize and introduce ownership transfer. 2021-12-20 00:17:17 +13:00
Nobuyoshi Nakada a81e0600a7 [ruby/reline] Load correct version.rb from gemspec
When merged to ruby/ruby, reline.gemspec file is located under
lib/reline, as the same as reline/version.rb.  That is the latter
path relative from the former differs from the ruby/reline case,
and the reline/version.rb in the default load path will be loaded.
Try `require_relative` not to load unexpected files.

https://github.com/ruby/reline/commit/54905d0e1b
2021-12-19 12:14:10 +09:00
aycabta 7159af3491 [ruby/reline] Clear dialog in pasting
https://github.com/ruby/reline/commit/dabf5313e0
2021-12-19 11:19:50 +09:00
Samuel Williams f3e30b26c5 Default size for IO::Buffer. 2021-12-19 12:25:38 +13:00
Koichi Sasada 6bef1ac628 `rb_iseq_update_references()` cares `script_lines`
and it fixes compaction issue:
http://rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20211218T203001Z.fail.html.gz
2021-12-19 06:15:22 +09:00
Daniel Colson 45f2182438 YJIT: Implement intern
`intern` showed up in the top 20 most frequent exit ops (granted with a
fairly small percentage) in a benchmark run by @jhawthorn on
github/github.

This implementation is similar to gen_anytostring, but with 1
stack pop instead of 2.

Co-authored-by: John Hawthorn <jhawthorn@github.com>
2021-12-18 15:59:30 -05:00
Koichi Sasada dd29ba0764 `iseq_type_sym()` -> `iseq_type_id()`
`iseq_type_sym()` returns `ID` (surprisingly!) so rename it
to `iseq_type_id()`.
2021-12-19 05:35:16 +09:00
Koichi Sasada 89a02d8932 add `rb_iseq_type()` to return iseq type in Symbol
It is shorthand `ISeq#to_a[9]`.
2021-12-19 05:16:29 +09:00
Yusuke Endoh 52b1c76534 Manually sync d2140d795a 2021-12-19 04:13:14 +09:00
Yusuke Endoh 6a51c3e80c Make AST.of possible even under eval when keep_script_lines is enabled
Now the following code works without an exception.

```
RubyVM.keep_script_lines = true

eval(<<END)
def foo
end
END

p RubyVM::AbstractSyntaxTree.of(method(:foo))
```
2021-12-19 04:00:51 +09:00
Yusuke Endoh acac2b8128 Make RubyVM::AbstractSyntaxTree.of raise for backtrace location in eval
This check is needed to fix a bug of error_highlight when NameError
occurred in eval'ed code.
https://github.com/ruby/error_highlight/pull/16

The same check for proc/method has been already introduced since
64ac984129.
2021-12-19 03:51:37 +09:00
Burdette Lamar 7e0e6f9074
What's Here for ENV (#5292)
[DOC] What's Here for ENV
2021-12-18 12:32:11 -06:00
git 1ed520a9ef * 2021-12-19 [ci skip] 2021-12-19 01:07:23 +09:00
Koichi Sasada 45de4025f5 skip -v spec on MJIT
fix this failure:

```
configure ... cppflags=-DMJIT_FORCE_ENABLE
...
make test-spec

1)
The -v command line option when used alone prints version and ends FAILED
Expected
"ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) +MJIT [x86_64-linux]
"
to include "ruby 3.1.0dev (2021-12-18T10:10:42Z master 78c175280b) [x86_64-linux]"
/tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:9:in `block (3 levels) in <top (required)>'
/tmp/ruby/v3/src/trunk-mjit-wait/spec/ruby/command_line/dash_v_spec.rb:4:in `<top (required)>'
```

http://ci.rvm.jp/results/trunk-mjit-wait@phosphorus-docker/3759943
2021-12-19 01:07:02 +09:00
Samuel Williams 235f523a88 Fix spelling of DECLAIR_TYPE. 2021-12-19 00:19:55 +13:00
Samuel Williams 78c175280b Fix code formatting. 2021-12-18 23:10:42 +13:00
Samuel Williams 1560cc1688 Introduce setup instructions for better parallelism. 2021-12-18 23:10:42 +13:00
Samuel Williams 75b5a4808f Initial hacking guide. 2021-12-18 19:15:11 +13:00
Samuel Williams 42d3231154
Introduce io_result wrapper for passing `[-errno, size]` in VALUE. 2021-12-18 18:19:30 +13:00
Nobuyoshi Nakada 922a81a994
Skip tests on pull requests labeled as Documentation 2021-12-18 13:06:15 +09:00
Nobuyoshi Nakada 629c8f12ae
Fix pull_request condition [ci skip] 2021-12-18 13:05:48 +09:00
Nobuyoshi Nakada 424605da7c
[DOC] Cache stdgems list 2021-12-18 10:33:04 +09:00
aycabta 1c49d809f4 [ruby/reline] Remove unnecessary "*"
https://github.com/ruby/reline/commit/7b50638e24
2021-12-18 10:18:33 +09:00
aycabta 7f2123bc08 [ruby/reline] Add a space after a comma
https://github.com/ruby/reline/commit/6009b3ef7a
2021-12-18 10:18:32 +09:00
aycabta adf6c0928d [ruby/reline] Change a test method name to more appropriate
https://github.com/ruby/reline/commit/d014cc85b7
2021-12-18 10:15:23 +09:00
aycabta 8cc01b668a [ruby/reline] Add space
https://github.com/ruby/reline/commit/1bb071bcf5
2021-12-18 10:15:23 +09:00
Charles Oliver Nutter 66ec3217df
[ruby/pp] Add context to bind_call and skip 2.7+ test
The bind_call definition here is added primarily to support
running the tests on JRuby 9.3, which only supports Ruby 2.6
features. The excluded test appears to depend on inspect behavior
that changed after Ruby 2.6.

With these two changes the test suite runs green on Ruby 2.6 and
JRuby 9.3.

https://github.com/ruby/pp/commit/892c612958
2021-12-18 08:38:59 +09:00
Charles Oliver Nutter cc73dfb92a
[ruby/pp] Incorporate 2.6 versions of 2.7 methods needed
* UnboundMethod#bind_call
* ruby2_keywords gem for testing

https://github.com/ruby/pp/commit/721d8cbd10
2021-12-18 08:38:59 +09:00
Charles Oliver Nutter 73da1c5ea3
[ruby/pp] Use etc instead of .so for broader compatibility
The use of `etc.so` here requires that etc is always implemented
as a C extension on-disk. However at least one impl – JRuby –
currently implements it as an internal extension, loaded via a
Ruby script. This require should simply use the base name of the
library, `etc`, to allow Ruby-based implementations to load as
well.

https://github.com/ruby/pp/commit/2061f994e0
2021-12-18 08:38:58 +09:00
Charles Oliver Nutter 5a6baaba38
[ruby/pp] Only do RubyVM patches if class exists
This class does not exist in any implementation except CRuby.

I would recommend moving this code somewhere else, like a separate
file loaded only on CRuby or into CRuby itself. For now this
change is sufficient to load the library on other implementations.

https://github.com/ruby/pp/commit/7d5a220f64
2021-12-18 08:38:58 +09:00
rm155 de6ef2ca71
[ruby/benchmark] Freeze VERSION
https://github.com/ruby/benchmark/commit/89b889b109
2021-12-18 08:38:58 +09:00
Hiroshi SHIBATA e442ec4ea0
[ruby/logger] Removed loading old helper file and load Logger class by itself
https://github.com/ruby/logger/commit/5ee0fd6e51
2021-12-18 08:38:58 +09:00
Baron Bloomer 4375546810
[ruby/logger] Test cases
https://github.com/ruby/logger/commit/40adb645e2
2021-12-18 08:38:58 +09:00
Baron Bloomer a8b11b5cdd
[ruby/logger] Changes to datetime formatting
Formatting a datetime should only pertain to itself and valid datetimes do not contain a space. Should there be a desire to show show a space between the datetime and the process pid in the formatted log, this formatting logic should take place there.
Furthermore, the default datetime format is moved to a class variable to allowing this variable to be overwritten by subclasses.

https://github.com/ruby/logger/commit/7cbd434349
2021-12-18 08:38:57 +09:00
Alan Wu cc5fcae170 YJIT: Remove double check for block arg handling
Inline and remove iseq_supported_args_p(iseq) to remove a potentially
dangerous double check on `iseq->body->param.flags.has_block` and
`iseq->body->local_iseq == iseq`. Double checking should be fine at the
moment as there should be no case where we perform a call to an iseq
that takes a block but `local_iseq != iseq`, but such situation might
be possible when we add support for calling into BMETHODs, for example.
Inlining also has the benefit of mirroring the interpreter's code for
blockarg setup in `setup_parameters_complex()`, making checking for
parity easier.

Extract `vm_ci_flag(ci) & VM_CALL_KWARG` into a const local for brevity.
Constify `doing_kw_call` because we can.
2021-12-17 15:26:04 -08:00
John Hawthorn c2197bf821 YJIT: Fix check for required kwargs
Previously, YJIT would not check that all the required keywords were
specified in the case that there were optional arguments specified. In
this case YJIT would incorrectly call the method with invalid arguments.
2021-12-17 15:26:04 -08:00
John Hawthorn 83aa68447c YJIT: Allow iseq with both opt and kwargs
Previously we mirrored the fast paths the interpreter had for having
only one of kwargs or optional args. This commit aims to combine the
cases and reduce complexity.

Though this allows calling iseqs which have have both optional and
keyword arguments, it requires that all optional arguments are specified
when there are keyword arguments, since unspecified optional arguments
appear before the kwargs. Support for this can be added a in a future
PR.
2021-12-17 15:26:04 -08:00
Burdette Lamar 5588aa79d4
What's Here for Symbol (#5289)
* What's Here for Symbol
2021-12-17 17:02:12 -06:00
git 6a1365d725 Update bundled gems list at 2021-12-17 2021-12-17 19:21:56 +00:00
Koichi Sasada dbb5abc45b debug.gem 1.4.0 2021-12-18 04:21:18 +09:00
git 74b58dd690 Update bundled gems list at 2021-12-17 2021-12-17 16:18:25 +00:00
git 55a93533e8 * 2021-12-18 [ci skip] 2021-12-18 01:18:08 +09:00