Skip to content

Commit a82e713

Browse files
Earlopainhsbt
authored andcommitted
Fix uplevel for cgi under bundler
Since there is `bundled_gems.rb` it is not always one. Fixes the following: ```sh $ ruby -w -rbundler/inline -e "gemfile {}; require 'cgi'" /home/earlopain/.rbenv/versions/ruby-dev/lib/ruby/3.5.0+0/bundled_gems.rb:59: warning: CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features. If you need to use the full features of CGI library, Please install cgi gem. ``` into: ```sh $ ruby -w -rbundler/inline -e "gemfile {}; require 'cgi'" -e:1: warning: CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features. If you need to use the full features of CGI library, Please install cgi gem. ```
1 parent bfe89c7 commit a82e713

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cgi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
require "cgi/escape"
4-
warn <<-WARNING, uplevel: 1 if $VERBOSE
4+
warn <<-WARNING, uplevel: Gem::BUNDLED_GEMS.uplevel if $VERBOSE
55
CGI library is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
66
If you need to use the full features of CGI library, Please install cgi gem.
77
WARNING

lib/cgi/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

33
require "cgi/escape"
4-
warn <<-WARNING, uplevel: 1 if $VERBOSE
4+
warn <<-WARNING, uplevel: Gem::BUNDLED_GEMS.uplevel if $VERBOSE
55
CGI::Util is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
66
WARNING

0 commit comments

Comments
 (0)