Skip to content

Commit

Permalink
Merge pull request #1097 from cloudfoundry/ruby-3-2
Browse files Browse the repository at this point in the history
Bumps Ruby to 3.2 with relevant changes
  • Loading branch information
anthonydahanne authored Dec 4, 2024
2 parents 03652e5 + 08e6111 commit b8abc29
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
4 changes: 4 additions & 0 deletions config/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ redis_store:
riverbed_appinternals_agent:
name: Riverbed Appinternals Agent

ruby:
name: Ruby
release_notes: 'https://www.ruby-lang.org/en/downloads/releases'

sealights_agent:
name: SeaLights Agent

Expand Down
2 changes: 1 addition & 1 deletion config/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@

# Configuration for Ruby
---
version: 3.1.+
version: 3.2.+
repository_root: https://raw.githubusercontent.com/cloudfoundry/ruby-buildpack/master/java-index
8 changes: 2 additions & 6 deletions lib/java_buildpack/util/filtering_pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ def ===(other)
@pathname === comparison_target(other) # rubocop:disable Style/CaseEquality
end

# Dispatch superclass methods via method_missing.
undef_method :taint
undef_method :untaint

# @see Pathname.
def +(other)
filtered_pathname(@pathname + other)
Expand All @@ -104,7 +100,7 @@ def entries

# @see Pathname.
def open(mode = nil, *args, **kwargs, &block)
check_mutable if mode =~ /[wa]/
check_mutable if /[wa]/ =~ mode.to_s
delegate.open(mode, *args, **kwargs, &block)
end

Expand Down Expand Up @@ -150,7 +146,7 @@ def glob(flags = 0)
private

MUTATORS = %i[chmod chown delete lchmod lchown make_link make_symlink mkdir mkpath rename rmdir rmtree taint
unlink untaint].to_set.freeze
unlink].to_set.freeze

private_constant :MUTATORS

Expand Down
18 changes: 0 additions & 18 deletions spec/java_buildpack/util/filtering_pathname_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,24 +380,6 @@
mutable_target.unlink
end

it 'raises error if untaint is called on an immutable instance' do
expect { immutable_target.untaint }.to raise_error(/FilteringPathname is immutable/)
end

it 'delegates if untaint is called on a mutable instance' do
allow(app_dir).to receive(:untaint)
mutable_target.untaint
end

it 'raises error if taint is called on an immutable instance' do
expect { immutable_target.taint }.to raise_error(/FilteringPathname is immutable/)
end

it 'delegates if taint is called on a mutable instance' do
allow(app_dir).to receive(:taint)
mutable_target.taint
end

it 'raises error if mkpath is called on an immutable instance' do
expect { immutable_target.mkpath }.to raise_error(/FilteringPathname is immutable/)
end
Expand Down

0 comments on commit b8abc29

Please sign in to comment.