Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Ruby 2.7 deprecation warn on Mounter#remove?
On Ruby 2.7, with deprecation warnings enabled, the Mounter#remove? code which handles string arguments to remove that we want to be treated as false-y ("0" and "false") was throwing a deprecation warning: "warning: deprecated Object#=~ is called on TrueClass; it always returns nil" This change fixes that warning by checking if the value is TrueClass before running the regular expression. Note that this does not change any behaviour since the presence check was already handling the case that a false Boolean was passed, and the case that a true Boolean was passed was already correctly not matching the regular expression albeit with the deprecation warning. This fix is the same as the one on the master branch commit 9a37fc9 by mshibuya.
- Loading branch information