Alan Wu
bba2bfc975
[DOC] encodings.rdoc: universal_newline reacts to \r
...
It wasn't clear that the mode also translates "\r" to "\n".
2022-12-22 13:10:22 -05:00
Yusuke Endoh
95a1d1fde8
addr2line.c: Support DW_FORM_rnglistx
2022-12-23 00:32:35 +09:00
Yusuke Endoh
53c82a6ce4
addr2line.c: Implement DW_AT_*_base
...
... and add code to parse the sections of .debug_addr_base and
.debug_rnglists_base.
2022-12-23 00:32:35 +09:00
Yusuke Endoh
515f816b7f
addr2line.c: Support DW_FORM_strx* forms
2022-12-23 00:32:35 +09:00
Yusuke Endoh
5234f99b76
addr2line.c: Support DW_FORM_addrx* forms
...
... and add VAL_addr value type
2022-12-23 00:32:35 +09:00
Yusuke Endoh
303e11697d
addr2line.c: Keep .debug_str_offsets and .debug_addr sections as well
...
clang generates DWARF with the sections
2022-12-23 00:32:35 +09:00
Peter Zhu
d7388f720c
Fix buffer overrun with auto-compact for shapes
...
The following script crashes:
```ruby
GC.auto_compact = true
GC.stress = true
class Foo
def initialize
@a = @b = @c = 0
end
def add_ivars
@d = @e = @f = 0
end
end
ary = 1_000.times.map { Foo.new }
ary.each { |f| f.add_ivars }
```
This is because in rb_grow_iv_list, it first calls
rb_ensure_iv_list_size to allocate the buffer (and also unsets the
embed bit) then rb_shape_transition_shape_capa to get the new shape.
However, auto-compact can trigger in rb_shape_transition_shape_capa
which would re-embed the object since it doesn't have the new shape yet.
This causes a crash as the object is now embedded but has a non-embed
shape which would cause the object to have a buffer overrun.
2022-12-22 09:23:40 -05:00
Yusuke Endoh
d1d61cabbc
addr2line.c: Fix another indexing bug
2022-12-22 20:37:40 +09:00
Yusuke Endoh
ebd6b5d826
addr2line.c: Fix indexing bug
2022-12-22 20:28:03 +09:00
Nobuyoshi Nakada
e61e4ae60b
Refactor reg_extract_args
to return regexp if given
2022-12-22 19:27:27 +09:00
Yusuke Endoh
78826ad486
addr2info.c: Make it work with --enable-yjit
...
Background: GCC 12 generates DWARF 5 with .debug_rnglists, while rustc
generates DWARF 4 with .debug_ranges.
The previous logic always used .debug_rnglists if there is the section.
However, we need to refer .debug_ranges for DWARF 4.
This change keeps DWARF version of the current compilation unit and use
a proper section depending on the version.
2022-12-22 18:57:06 +09:00
Yusuke Endoh
c827d724b7
addr2line.c: Support "Line Number Program Header" in DWARF 5
2022-12-22 18:57:06 +09:00
Yusuke Endoh
2445a4c5b7
addr2line.c: Keep .debug_line_str section as well
...
... and properly support DW_FORM_line_strp.
This is a prepartion to support DWARF 5.
2022-12-22 18:57:06 +09:00
git
ed81d0f5f6
Update default gems list at fe7190a8c1
[ci skip]
2022-12-22 08:49:43 +00:00
Hiroshi SHIBATA
fe7190a8c1
[ruby/optparse] Bump version to 0.3.1
...
2a1e157ae1
2022-12-22 17:48:22 +09:00
Kazuki Tsujimoto
298176f23a
NEWS.md: Update power_assert version
2022-12-22 16:20:23 +09:00
Nobuyoshi Nakada
454c00723a
Share argument parsing in Regexp#initialize
and Regexp.linear_time?
2022-12-22 15:51:00 +09:00
Takashi Kokubun
bb4cbd0803
Put RubyVM::MJIT::Compiler under ruby_vm directory ( #6989 )
...
[Misc #19250 ]
2022-12-21 22:46:15 -08:00
Nobuyoshi Nakada
43f4093a31
Adjust style [ci skip]
2022-12-22 15:12:05 +09:00
Kazuhiro NISHIYAMA
af0ea88b30
Fix link [ci skip]
2022-12-22 15:02:36 +09:00
Takashi Kokubun
186b5c0086
Revert "Update bundled gems list at 2022-12-22"
...
This reverts commit 89a66f20d8
.
2022-12-21 21:49:30 -08:00
Jeremy Evans
1e193c78d2
Clarify NEWS entry for Bug #16889
2022-12-21 21:05:08 -08:00
Jeremy Evans
4213f42555
Make sure TracePoint#binding returns nil for c_call/c_return events
...
This makes sure the method returns nil for these events, as
described in NEWS, even if the TracePoint could create a binding.
2022-12-21 21:02:43 -08:00
zverok
ae455a129e
[DOC] Update TracePoint.allow_reentry docs
...
Adjust call-seq to mention block, and add examples
and explanations.
2022-12-22 13:37:58 +09:00
Kazuki Tsujimoto
b7bb14b96e
Update documentation about Time#deconstruct_keys
2022-12-22 13:05:09 +09:00
Nobuyoshi Nakada
4e6c44e297
[DOC] Fix the paragraph about PRNG update
2022-12-22 12:48:11 +09:00
Hiroshi SHIBATA
e3847f39a1
Added the missing word with 1e1d7047fc
2022-12-22 12:27:09 +09:00
Hiroshi SHIBATA
1e1d7047fc
Introduce GH releases for default gems and bundled gems
2022-12-22 12:25:00 +09:00
Yusuke Endoh
2811d9d224
NEWS.md: Tweak "Constant lookup when defining a class/module"
2022-12-18 19:18:35 +09:00
Yusuke Endoh
dd338ae124
NEWS.md: Fix typos
2022-12-18 18:48:02 +09:00
Yusuke Endoh
937299ede1
NEWS.md: Fix a typo
2022-12-18 18:47:19 +09:00
git
89a66f20d8
Update bundled gems list at 2022-12-22
2022-12-22 02:34:24 +00:00
Kazuki Tsujimoto
5b85e4040e
Update power_assert to 2.0.3
2022-12-22 11:12:59 +09:00
Takashi Kokubun
5b76a8ed56
Introduce some notable IRB features in NEWS [ci skip]
2022-12-21 17:41:00 -08:00
Takashi Kokubun
67ef3cd3cc
Skip a flaky Ractor test for mswin
2022-12-21 16:56:41 -08:00
Takashi Kokubun
2537182063
Make it clear that it doesn't update the receiver [ci skip]
2022-12-21 16:45:54 -08:00
Takashi Kokubun
4e6b4cce80
Add Data#with to examples in the NEWS [ci skip]
2022-12-21 16:44:47 -08:00
Ufuk Kayserilioglu
99cee85775
Add copy with changes functionality for Data objects ( #6766 )
...
Implements [Feature #19000 ]
This commit adds copy with changes functionality for `Data` objects
using a new method `Data#with`.
Since Data objects are immutable, the only way to change them is by
creating a copy. This PR adds a `with` method for `Data` class instances
that optionally takes keyword arguments.
If the `with` method is called with no arguments, the behaviour is the
same as the `Kernel#dup` method, i.e. a new shallow copy is created
with no field values changed.
However, if keyword arguments are supplied to the `with` method, then
the copy is created with the specified field values changed. For
example:
```ruby
Point = Data.define(:x, :y)
point = Point.new(x: 1, y: 2)
point.with(x: 3) # => #<data Point x: 3, y: 2>
```
Passing positional arguments to `with` or passing keyword arguments to
it that do not correspond to any of the members of the Data class will
raise an `ArgumentError`.
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2022-12-21 16:27:38 -08:00
Nobuyoshi Nakada
398aaed2f0
Fix the case trailer without newline
...
cf0b413ef8
2022-12-22 00:34:21 +09:00
Nobuyoshi Nakada
98fbebf110
[DOC] Fix typo
2022-12-22 00:01:18 +09:00
BurdetteLamar
172dc98c94
[ruby/net-http] Adding links to references
...
71bae5c0fe
2022-12-21 09:17:19 -05:00
BurdetteLamar
276b84f8ed
[ruby/net-http] Adding links to references
...
e4df80f299
2022-12-21 09:17:19 -05:00
BurdetteLamar
86f0128efe
[ruby/net-http] Adding links to references
...
df5a554fa8
2022-12-21 09:17:18 -05:00
Soutaro Matsumoto
6af6857ecf
Set up RBS_SKIP_TESTS ( #6862 )
...
* Set up RBS_SKIP_TESTS
2022-12-21 22:11:51 +09:00
Nobuyoshi Nakada
befc99c008
[DOC] tool/update-NEWS-refs.rb: Align footnotes
2022-12-21 20:48:51 +09:00
Nobuyoshi Nakada
c7c006cc68
[DOC] tool/update-NEWS-refs.rb: Remove extra brackets
...
Surrounding with brackets is just a convention for the bugs tracker
links.
2022-12-21 20:48:51 +09:00
Akinori MUSHA
cc4c28ec2e
Make Enumerartor.product return nil when called with a block
2022-12-21 19:13:15 +09:00
Akinori MUSHA
308ccbaeb2
Make product consistently yield an array of N elements instead of N arguments
...
Inconsistency pointed out by @mame:
```
>> Enumerator.product([1], [2], [3]).to_a
=> [[1, 2, 3]]
>> Enumerator.product([1], [2]).to_a
=> [[1, 2]]
>> Enumerator.product([1]).to_a
=> [1]
>> Enumerator.product().to_a
=> [nil]
```
Got fixed as follows:
```
>> Enumerator.product([1], [2], [3]).to_a
=> [[1, 2, 3]]
>> Enumerator.product([1], [2]).to_a
=> [[1, 2]]
>> Enumerator.product([1]).to_a
=> [[1]]
>> Enumerator.product().to_a
=> [[]]
```
This was due to the nature of the N-argument funcall in Ruby.
2022-12-21 18:19:19 +09:00
Hiroshi SHIBATA
684fa46ee6
Removed empty section
2022-12-21 18:57:37 +09:00
Hiroshi SHIBATA
e894ff5ec1
Update bundled_gems
2022-12-21 18:57:36 +09:00