Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/zjit-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}

- uses: taiki-e/install-action@a37010ded18ff788be4440302bd6830b1ae50d8b # v2.68.25
- uses: taiki-e/install-action@64c5c20c872907b6f7cd50994ac189e7274160f2 # v2.68.26
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
ruby-version: '3.1'
bundler: none

- uses: taiki-e/install-action@a37010ded18ff788be4440302bd6830b1ae50d8b # v2.68.25
- uses: taiki-e/install-action@64c5c20c872907b6f7cd50994ac189e7274160f2 # v2.68.26
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
1 change: 1 addition & 0 deletions depend
Original file line number Diff line number Diff line change
Expand Up @@ -11749,6 +11749,7 @@ prism/prism.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
prism/prism.$(OBJEXT): {$(VPATH)}prism_xallocator.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/ast.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/defines.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/diagnostic.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/encoding.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/options.h
prism/regexp.$(OBJEXT): $(top_srcdir)/prism/parser.h
Expand Down
25 changes: 13 additions & 12 deletions doc/language/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ These global variables store information about the most recent
successful match in the current scope.

For details and examples,
see {Regexp Global Variables}[rdoc-ref:Regexp@Global+Variables].
see [Regexp Global Variables].

### `$~` (\MatchData)

Expand Down Expand Up @@ -341,7 +341,7 @@ Aliased as `$-d`.
### `$VERBOSE`

Initially `true` if [command-line option `-v`] or
[`-w`][command-line option `-w`] is given, otherwise initially `false`;
[command-line option `-w`] is given, otherwise initially `false`;
may be set to either value, or to `nil`, in the running program.

When `true`, enables Ruby warnings.
Expand Down Expand Up @@ -597,14 +597,15 @@ Output:
"Baz\n"
```


[command-line option `-0`]: rdoc-ref:language/options.md@0-3A+Set+-24-2F+-28Input+Record+Separator-29
[command-line option `-F`]: rdoc-ref:language/options.md@F-3A+Set+Input+Field+Separator
[command-line option `-a`]: rdoc-ref:language/options.md@a-3A+Split+Input+Lines+into+Fields
[command-line option `-d`]: rdoc-ref:language/options.md@d-3A+Set+-24DEBUG+to+true
[command-line option `-i`]: rdoc-ref:language/options.md@i-3A+Set+ARGF+In-Place+Mode
[command-line option `-l`]: rdoc-ref:language/options.md@l-3A+Set+Output+Record+Separator-3B+Chop+Lines
[command-line option `-p`]: rdoc-ref:language/options.md@p-3A+-n-2C+with+Printing
[command-line option `-v`]: rdoc-ref:language/options.md@v-3A+Print+Version-3B+Set+-24VERBOSE
[command-line option `-w`]: rdoc-ref:language/options.md@w-3A+Synonym+for+-W1
[command-line option `-0`]: rdoc-ref:language/options.md@-0-set--input-record-separator
[command-line option `-F`]: rdoc-ref:language/options.md@-f-set-input-field-separator
[command-line option `-a`]: rdoc-ref:language/options.md@-a-split-input-lines-into-fields
[command-line option `-d`]: rdoc-ref:language/options.md@-d-set-debug-to-true
[command-line option `-i`]: rdoc-ref:language/options.md@-i-set-argf-in-place-mode
[command-line option `-l`]: rdoc-ref:language/options.md@-l-set-output-record-separator-chop-lines
[command-line option `-p`]: rdoc-ref:language/options.md@-p--n-with-printing
[command-line option `-v`]: rdoc-ref:language/options.md@-v-print-version-set-verbose
[command-line option `-w`]: rdoc-ref:language/options.md@-w-synonym-for--w1

[Regexp Global Variables]: rdoc-ref:Regexp@Global+Variables

10 changes: 9 additions & 1 deletion doc/maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ consensus on ruby-core/ruby-dev.

* *No maintainer*

#### lib/pathname.rb
#### pathname_builtin.rb, lib/pathname.rb

* Tanaka Akira ([akr])

Expand All @@ -65,6 +65,10 @@ consensus on ruby-core/ruby-dev.

### Standard Library(Extensions) Maintainers

#### set.c

* Akinori MUSHA ([knu])

#### ext/continuation

* Koichi Sasada ([ko1])
Expand All @@ -85,6 +89,10 @@ consensus on ruby-core/ruby-dev.

* *No maintainer*

#### ext/pathname

* Tanaka Akira ([akr])

#### ext/pty

* *No maintainer*
Expand Down
7 changes: 7 additions & 0 deletions lib/bundled_gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ def self.warning?(name, specs: nil)
if subfeature
prefix = feature.split("/").first + "-"
return if specs.any? { |spec, _| spec.start_with?(prefix) }

# Don't warn if the feature is found outside the standard library
# (e.g., benchmark-ips's lib dir is on $LOAD_PATH but not in specs)
resolved = $LOAD_PATH.resolve_feature_path(feature) rescue nil
if resolved
return unless resolved[1].start_with?(LIBDIR) || resolved[1].start_with?(ARCHDIR)
end
end

return if WARNED[name]
Expand Down
48 changes: 44 additions & 4 deletions lib/bundler/inline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,52 @@ def gemfile(force_latest_compatible = false, options = {}, &gemfile)
definition.validate_runtime!

if force_latest_compatible || definition.missing_specs?
Bundler.settings.temporary(inline: true, no_install: false) do
installer = Bundler::Installer.install(Bundler.root, definition, system: true)
installer.post_install_messages.each do |name, message|
Bundler.ui.info "Post-install message from #{name}:\n#{message}"
do_install = -> do
Bundler.settings.temporary(inline: true, no_install: false) do
installer = Bundler::Installer.install(Bundler.root, definition, system: true)
installer.post_install_messages.each do |name, message|
Bundler.ui.info "Post-install message from #{name}:\n#{message}"
end
end
end

# When possible we do the install in a subprocess because to install
# gems we need to require some default gems like `securerandom` etc
# which may later conflict with the Gemfile requirements.
installed_in_fork = false
if Process.respond_to?(:fork)
Gem.load_yaml # Avoid NameError on Ruby 3.2's safe_yaml.rb after Gem::Specification.reset
_, status = Process.waitpid2(Process.fork do
$VERBOSE = nil
do_install.call end)
exit(status.exitstatus || status.to_i) unless status.success?

installed_in_fork = true

Bundler.reset!
Gem::Specification.reset
Bundler.instance_variable_set(:@bundle_path, Pathname.new(Gem.dir))

builder = Bundler::Dsl.new
builder.instance_eval(&gemfile)
builder.check_primary_source_safety

definition = builder.to_definition(nil, true)
definition.validate_runtime!
else
do_install.call
end
end

configure_forked_definition = ->(d) do
d.sources.rubygems_sources.each(&:remote!)
d.sources.git_sources.each do |source|
source.cached!
source.instance_variable_set(:@copied, true)
end
def d.lock(*); end
end
configure_forked_definition.call(definition) if installed_in_fork

begin
runtime = Bundler::Runtime.new(nil, definition).setup
Expand All @@ -84,6 +123,7 @@ def gemfile(force_latest_compatible = false, options = {}, &gemfile)
builder.dependencies.delete_if {|d| d.name == name }
builder.instance_eval { gem name, activated_version }
definition = builder.to_definition(nil, true)
configure_forked_definition.call(definition) if installed_in_fork

retry
end
Expand Down
2 changes: 2 additions & 0 deletions prism/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ errors:
- PATTERN_TERM_PAREN
- PIPEPIPEEQ_MULTI_ASSIGN
- REGEXP_ENCODING_OPTION_MISMATCH
- REGEXP_ESCAPED_NON_ASCII_IN_UTF8
- REGEXP_INCOMPAT_CHAR_ENCODING
- REGEXP_INVALID_CHAR_PROPERTY
- REGEXP_INVALID_UNICODE_RANGE
- REGEXP_NON_ESCAPED_MBC
- REGEXP_PARSE_ERROR
Expand Down
6 changes: 0 additions & 6 deletions prism/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -933,12 +933,6 @@ struct pm_parser {
*/
bool semantic_token_seen;

/**
* True if the current regular expression being lexed contains only ASCII
* characters.
*/
bool current_regular_expression_ascii_only;

/**
* By default, Ruby always warns about mismatched indentation. This can be
* toggled with a magic comment.
Expand Down
Loading