Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ruby version for Kernel#trust, #untrust and #untrusted #1031

Merged
merged 1 commit into from
May 17, 2023
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
8 changes: 7 additions & 1 deletion core/kernel/trust_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative 'fixtures/classes'

describe "Kernel#trust" do
ruby_version_is ""..."3.0" do
ruby_version_is ""..."3.2" do
it "is a no-op" do
o = Object.new.untrust
o.should_not.untrusted?
Expand All @@ -17,4 +17,10 @@
}.should complain(/Object#trust is deprecated and will be removed in Ruby 3.2/, verbose: true)
end
end

ruby_version_is "3.2" do
it "has been removed" do
Object.new.should_not.respond_to?(:trust)
end
end
end
8 changes: 7 additions & 1 deletion core/kernel/untrust_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative 'fixtures/classes'

describe "Kernel#untrust" do
ruby_version_is ""..."3.0" do
ruby_version_is ""..."3.2" do
it "is a no-op" do
o = Object.new
o.untrust
Expand All @@ -16,4 +16,10 @@
}.should complain(/Object#untrust is deprecated and will be removed in Ruby 3.2/, verbose: true)
end
end

ruby_version_is "3.2" do
it "has been removed" do
Object.new.should_not.respond_to?(:untrust)
end
end
end
8 changes: 7 additions & 1 deletion core/kernel/untrusted_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative 'fixtures/classes'

describe "Kernel#untrusted?" do
ruby_version_is ""..."3.0" do
ruby_version_is ""..."3.2" do
it "is a no-op" do
o = mock('o')
o.should_not.untrusted?
Expand All @@ -17,4 +17,10 @@
}.should complain(/Object#untrusted\? is deprecated and will be removed in Ruby 3.2/, verbose: true)
end
end

ruby_version_is "3.2" do
it "has been removed" do
Object.new.should_not.respond_to?(:untrusted?)
end
end
end