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

364 Коммитов

Автор SHA1 Сообщение Дата
Koichi ITO f924e05b68
[DOC] Fix a typo in the NEWS.md
Follow up of https://github.com/ruby/ruby/commit/fbb3cab.
2022-01-31 07:38:10 +09:00
Takashi Kokubun fbb3cab956
Add a NEWS entry about [Feature #16806] 2022-01-29 00:32:38 -08:00
Nobuyoshi Nakada e3b5cc8836
NEWS: `Fixnum` and `Bignum` are removed finally [Feature #12005] 2022-01-25 23:10:20 +09:00
git c6a19b77a2 Update default gems list at 328e6bf3b3 [ci skip] 2022-01-24 01:57:23 +00:00
Kazuhiro NISHIYAMA 54568c949b
Fix a link [ci skip] 2022-01-18 22:57:21 +09:00
Takashi Kokubun c0d18a1aa2
[ruby/erb] Revert "Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)"
This reverts commit 5133efa06f.

While we already handled this deprecation in many libraries, we noticed
that some (e.g. sprockets) relied on the format of `ERB.version` and
2b4182eb10 broke such handling.

Given that the `ERB.version` change was released at 3.1 and it's
obviously new, I'll skip this removal in 3.2 and postpone this to a
future version.
2022-01-17 12:39:17 -08:00
Takashi Kokubun 728304093c
Update NEWS.md about ERB.new 2022-01-15 13:53:57 -08:00
Jeremy Evans a93cc3e23b Make Hash#shift return nil for empty hash
Fixes [Bug #16908]
2022-01-14 12:17:57 -08:00
Jeremy Evans ca3d405242 Fix constant assignment evaluation order
Previously, the right hand side was always evaluated before the
left hand side for constant assignments.  For the following:

```ruby
lhs::C = rhs
```

rhs was evaluated before lhs, which is inconsistant with attribute
assignment (lhs.m = rhs), and apparently also does not conform to
JIS 3017:2013 11.4.2.2.3.

Fix this by changing evaluation order.  Previously, the above
compiled to:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 dup
0004 putself
0005 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0007 setconstant                            :C
0009 leave
```

After this change:

```
0000 putself                                                          (   1)[Li]
0001 opt_send_without_block                 <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 putself
0004 opt_send_without_block                 <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0006 swap
0007 topn                                   1
0009 swap
0010 setconstant                            :C
0012 leave
```

Note that if expr is not a module/class, then a TypeError is not
raised until after the evaluation of rhs.  This is because that
error is raised by setconstant.  If we wanted to raise TypeError
before evaluation of rhs, we would have to add a VM instruction
for calling vm_check_if_namespace.

Changing assignment order for single assignments caused problems
in the multiple assignment code, revealing that the issue also
affected multiple assignment.  Fix the multiple assignment code
so left-to-right evaluation also works for constant assignments.

Do some refactoring of the multiple assignment code to reduce
duplication after adding support for constants. Rename struct
masgn_attrasgn to masgn_lhs_node, since it now handles both
constants and attributes. Add add_masgn_lhs_node static function
for adding data for lhs attribute and constant setting.

Fixes [Bug #15928]
2022-01-14 11:00:26 -08:00
Jean Boussier 8d05047d72 Add a Module#const_added callback
[Feature #17881]

Works similarly to `method_added` but for constants.

```ruby
Foo::BAR = 42 # call Foo.const_added(:FOO)
class Foo::Baz; end # call Foo.const_added(:Baz)
Foo.autoload(:Something, "path") # call Foo.const_added(:Something)
```
2022-01-14 11:30:07 +01:00
Koichi Sasada 9de380860d add a NEWS entry of `Proc#dup`. 2022-01-13 17:45:25 +09:00
Kazuhiro NISHIYAMA 533bc77170
Fix typo [ci skip] 2022-01-07 09:44:33 +09:00
manga_osyo 1bfccba775 Add bugs.ruby links. 2022-01-07 01:13:04 +09:00
git 2db7952e59 Update bundled gems list at 2022-01-06 2022-01-06 07:02:37 +00:00
Nobuyoshi Nakada 3e417a554b
NEWS: "taintedness" and "trustedness" methods are removed 2022-01-06 11:32:27 +09:00
Nobuyoshi Nakada ac0d27eb58
NEWS: Separate removed constants section 2022-01-06 11:20:55 +09:00
Nobuyoshi Nakada e38d583391
NEWS: Links to the tickets to remove deprecated features 2022-01-05 18:27:16 +09:00
Nobuyoshi Nakada 1272a331b4
NEWS: Removal of `Kernel#=~` [Feature #15231] 2022-01-05 18:18:43 +09:00
Shugo Maeda 54198c7b97
Add Module#refinements and Refinement#refined_class [Feature #12737] 2022-01-05 17:47:29 +09:00
Shugo Maeda 21ee5341f8
Add Module.used_refinements 2022-01-05 16:58:23 +09:00
git 30c03f9e93 Update default gems list at 6f53425825 [ci skip] 2022-01-02 06:06:11 +00:00
Nobuyoshi Nakada 6f53425825
NEWS: Removed constants 2022-01-02 15:05:02 +09:00
git b2a88063d6 Update default gems list at 6d1b406dc8 [ci skip] 2022-01-02 02:29:48 +00:00
Nobuyoshi Nakada f59b2e440e
NEWS: Removed methods 2021-12-31 23:59:50 +09:00
Nobuyoshi Nakada 60e9aa5733
NEWS: Removed C APIs 2021-12-31 23:59:04 +09:00
Jeremy Evans f53dfab95c Add support for anonymous rest and keyword rest argument forwarding
This allows for the following syntax:

```ruby
def foo(*)
  bar(*)
end
def baz(**)
  quux(**)
end
```

This is a natural addition after the introduction of anonymous
block forwarding.  Anonymous rest and keyword rest arguments were
already supported in method parameters, this just allows them to
be used as arguments to other methods.  The same advantages of
anonymous block forwarding apply to rest and keyword rest argument
forwarding.

This has some minor changes to #parameters output.  Now, instead
of `[:rest], [:keyrest]`, you get `[:rest, :*], [:keyrest, :**]`.
These were already used for `...` forwarding, so I think it makes
it more consistent to include them in other cases.  If we want to
use `[:rest], [:keyrest]` in both cases, that is also possible.

I don't think the previous behavior of `[:rest], [:keyrest]` in
the non-... case and `[:rest, :*], [:keyrest, :**]` in the ...
case makes sense, but if we did want that behavior, we'll have to
make more substantial changes, such as using a different ID in the
... forwarding case.

Implements [Feature #18351]
2021-12-30 14:37:42 -08:00
git 6d57290210 Update bundled gems list at 2021-12-29 2021-12-29 07:02:15 +00:00
git 7fbd93e60f Update default gems list at d75f7078c8 [ci skip] 2021-12-29 01:03:36 +00:00
git f486566f13 Update default gems list at d6311cb1ca [ci skip] 2021-12-27 01:48:03 +00:00
git 18da9359de Update bundled gems list at 2322967f3e [ci skip] 2021-12-26 06:51:28 +00:00
git 2322967f3e Update default gems list at 1698010bb1 [ci skip] 2021-12-26 06:38:45 +00:00
git a91605c9da Update default gems list at 53b3c044fc [ci skip] 2021-12-25 14:12:38 +00:00
Kazuhiro NISHIYAMA 53b3c044fc
Copy NEWS.md to doc/NEWS-3.1.0.md and update for 3.2.0 2021-12-25 23:11:43 +09:00
Nobuyoshi Nakada 1ad42f8a76
Update default gems list at 8247b193c0 [ci skip] 2021-12-25 18:43:37 +09:00
Nobuyoshi Nakada 14e550052b
NEWS: mention Time.new argument error more
Show an example of Time.new with perhaps unexpected results in
earlier versions.
2021-12-25 18:24:39 +09:00
Nobuyoshi Nakada 42eb9bf37a
Fix the names of Thread::Queue and method for the cross-reference 2021-12-25 17:45:22 +09:00
Nobuyoshi Nakada 30374b4fb7
NEWS: Put spaces to make Method and UnboundMethod links 2021-12-25 17:42:27 +09:00
aycabta dba24e6a1a Add IRB Improvements section to NEWS.md 2021-12-25 17:05:39 +09:00
Nobuyoshi Nakada 0abf781ab4
NEWS: Mention about more strict conversions for [Feature #17485] 2021-12-25 13:14:54 +09:00
git 70aa7734e9 Update default gems list at 0f1fbc6421 [ci skip] 2021-12-25 04:13:21 +00:00
git 63d75d38cb Update default gems list at 40c20110d5 [ci skip] 2021-12-25 02:04:23 +00:00
git d100c91445 Update default gems list at da6a5e3ed1 [ci skip] 2021-12-24 22:45:36 +00:00
git 2b2115318b Update default gems list at efce9ecf72 [ci skip] 2021-12-24 18:38:28 +00:00
Alan Wu cab8b88a16 NEWS: Adapt YJIT support status to include OpenBSD
We don't run YJIT CI checks on OpenBSD so can't claim that we provide
first-class maintenance support. However, as of
3b2b28d035, YJIT can at least boot on OpenBSD.
2021-12-24 12:35:24 -05:00
Alan Wu b81faf4b1f Less bravado in YJIT performance claims
YJIT can't improve performance of non Ruby software of course.
2021-12-24 11:59:57 -05:00
git 628e845843 Update default gems list at 90239c4163 [ci skip] 2021-12-24 15:47:38 +00:00
Koichi Sasada 38b3adc4cb add a NEWS entry about cvar inline cache 2021-12-25 00:01:21 +09:00
git 4767cf0cb5 Update default gems list at f9712b029b [ci skip] 2021-12-24 14:21:17 +00:00
Soutaro Matsumoto 8d940e3032
Bundle RBS 2.0.0 (#5330)
* Bundle RBS 2.0.0

* Update NEWS.md
2021-12-24 22:54:45 +09:00
git babc200ee8 Update default gems list at 67aab88a22 [ci skip] 2021-12-24 11:10:13 +00:00