Skip to content

Commit b8abc29

Browse files
Merge pull request #1097 from cloudfoundry/ruby-3-2
Bumps Ruby to 3.2 with relevant changes
2 parents 03652e5 + 08e6111 commit b8abc29

File tree

4 files changed

+7
-25
lines changed

4 files changed

+7
-25
lines changed

config/packaging.yml

+4
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ redis_store:
170170
riverbed_appinternals_agent:
171171
name: Riverbed Appinternals Agent
172172

173+
ruby:
174+
name: Ruby
175+
release_notes: 'https://www.ruby-lang.org/en/downloads/releases'
176+
173177
sealights_agent:
174178
name: SeaLights Agent
175179

config/ruby.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
# Configuration for Ruby
1717
---
18-
version: 3.1.+
18+
version: 3.2.+
1919
repository_root: https://raw.githubusercontent.com/cloudfoundry/ruby-buildpack/master/java-index

lib/java_buildpack/util/filtering_pathname.rb

+2-6
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ def ===(other)
8383
@pathname === comparison_target(other) # rubocop:disable Style/CaseEquality
8484
end
8585

86-
# Dispatch superclass methods via method_missing.
87-
undef_method :taint
88-
undef_method :untaint
89-
9086
# @see Pathname.
9187
def +(other)
9288
filtered_pathname(@pathname + other)
@@ -104,7 +100,7 @@ def entries
104100

105101
# @see Pathname.
106102
def open(mode = nil, *args, **kwargs, &block)
107-
check_mutable if mode =~ /[wa]/
103+
check_mutable if /[wa]/ =~ mode.to_s
108104
delegate.open(mode, *args, **kwargs, &block)
109105
end
110106

@@ -150,7 +146,7 @@ def glob(flags = 0)
150146
private
151147

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

155151
private_constant :MUTATORS
156152

spec/java_buildpack/util/filtering_pathname_spec.rb

-18
Original file line numberDiff line numberDiff line change
@@ -380,24 +380,6 @@
380380
mutable_target.unlink
381381
end
382382

383-
it 'raises error if untaint is called on an immutable instance' do
384-
expect { immutable_target.untaint }.to raise_error(/FilteringPathname is immutable/)
385-
end
386-
387-
it 'delegates if untaint is called on a mutable instance' do
388-
allow(app_dir).to receive(:untaint)
389-
mutable_target.untaint
390-
end
391-
392-
it 'raises error if taint is called on an immutable instance' do
393-
expect { immutable_target.taint }.to raise_error(/FilteringPathname is immutable/)
394-
end
395-
396-
it 'delegates if taint is called on a mutable instance' do
397-
allow(app_dir).to receive(:taint)
398-
mutable_target.taint
399-
end
400-
401383
it 'raises error if mkpath is called on an immutable instance' do
402384
expect { immutable_target.mkpath }.to raise_error(/FilteringPathname is immutable/)
403385
end

0 commit comments

Comments
 (0)