Skip to content

Commit c652854

Browse files
nobuk0kubun
authored andcommitted
[ruby/erb] Use cgi/escape instead of deprecated cgi/util
1 parent 03a7f1f commit c652854

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lib/erb.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,4 @@ Gem::Specification.new do |spec|
3333
spec.required_ruby_version = '>= 2.7.0'
3434
spec.extensions = ['ext/erb/escape/extconf.rb']
3535
end
36-
37-
spec.add_dependency 'cgi', '>= 0.3.3'
3836
end

lib/erb.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@
1212
#
1313
# You can redistribute it and/or modify it under the same terms as Ruby.
1414

15-
begin
16-
require 'cgi/escape'
17-
rescue LoadError
18-
require 'cgi/util'
19-
end
15+
require 'cgi/escape'
2016
require 'erb/version'
2117
require 'erb/compiler'
2218
require 'erb/def_method'

0 commit comments

Comments
 (0)