summaryrefslogtreecommitdiff
path: root/spec/ruby/library/cgi
diff options
context:
space:
mode:
authorAndrew Konchin <andry.konchin@gmail.com>2025-06-02 19:34:54 +0300
committerBenoit Daloze <eregontp@gmail.com>2025-06-02 21:54:48 +0200
commitd6aa1714fed3e8b5ee8bede00a8853c338ff6092 (patch)
treeea863a44d9026f74b9a07375f401c3e5d8cb4bf5 /spec/ruby/library/cgi
parent685c8ca9af892f562f64b54dbee73bb9a1999b90 (diff)
Update to ruby/spec@4d2fc4d
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13495
Diffstat (limited to 'spec/ruby/library/cgi')
-rw-r--r--spec/ruby/library/cgi/escapeElement_spec.rb8
-rw-r--r--spec/ruby/library/cgi/unescapeElement_spec.rb8
-rw-r--r--spec/ruby/library/cgi/unescape_spec.rb8
3 files changed, 15 insertions, 9 deletions
diff --git a/spec/ruby/library/cgi/escapeElement_spec.rb b/spec/ruby/library/cgi/escapeElement_spec.rb
index 528433d252..7bfa3f4feb 100644
--- a/spec/ruby/library/cgi/escapeElement_spec.rb
+++ b/spec/ruby/library/cgi/escapeElement_spec.rb
@@ -1,9 +1,11 @@
require_relative '../../spec_helper'
-begin
- require 'cgi/escape'
-rescue LoadError
+
+ruby_version_is ""..."3.5" do
require 'cgi'
end
+ruby_version_is "3.5" do
+ require 'cgi/escape'
+end
describe "CGI.escapeElement when passed String, elements, ..." do
it "escapes only the tags of the passed elements in the passed String" do
diff --git a/spec/ruby/library/cgi/unescapeElement_spec.rb b/spec/ruby/library/cgi/unescapeElement_spec.rb
index 3453393282..af2fa8a47d 100644
--- a/spec/ruby/library/cgi/unescapeElement_spec.rb
+++ b/spec/ruby/library/cgi/unescapeElement_spec.rb
@@ -1,9 +1,11 @@
require_relative '../../spec_helper'
-begin
- require 'cgi/escape'
-rescue LoadError
+
+ruby_version_is ""..."3.5" do
require 'cgi'
end
+ruby_version_is "3.5" do
+ require 'cgi/escape'
+end
describe "CGI.unescapeElement when passed String, elements, ..." do
it "unescapes only the tags of the passed elements in the passed String" do
diff --git a/spec/ruby/library/cgi/unescape_spec.rb b/spec/ruby/library/cgi/unescape_spec.rb
index 52e1cb0243..e750c72921 100644
--- a/spec/ruby/library/cgi/unescape_spec.rb
+++ b/spec/ruby/library/cgi/unescape_spec.rb
@@ -1,10 +1,12 @@
# -*- encoding: utf-8 -*-
require_relative '../../spec_helper'
-begin
- require 'cgi/escape'
-rescue LoadError
+
+ruby_version_is ""..."3.5" do
require 'cgi'
end
+ruby_version_is "3.5" do
+ require 'cgi/escape'
+end
describe "CGI.unescape" do
it "url-decodes the passed argument" do