diff --git a/lib/cgi.rb b/lib/cgi.rb index 71b52b6267..b041c1bed1 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require "cgi/escape" -warn <<-WARNING, uplevel: 1 if $VERBOSE +warn <<-WARNING, uplevel: Gem::BUNDLED_GEMS.uplevel if $VERBOSE 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. WARNING diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb index b862341e90..07deeda266 100644 --- a/lib/cgi/util.rb +++ b/lib/cgi/util.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true require "cgi/escape" -warn <<-WARNING, uplevel: 1 if $VERBOSE +warn <<-WARNING, uplevel: Gem::BUNDLED_GEMS.uplevel if $VERBOSE CGI::Util is removed from Ruby 3.5. Please use cgi/escape instead for CGI.escape and CGI.unescape features. WARNING