diff --git a/README.md b/README.md index 4821599..6c9bbb0 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The example enables the mprotect feature for the emacs binary: # As a root account require 'hbsdctl' BSD::Control - .feature!("mprotect") + .feature!(:mprotect) .enable!("/usr/local/bin/emacs") ``` diff --git a/lib/bsd/control.rb b/lib/bsd/control.rb index 1566d83..81ea9f0 100644 --- a/lib/bsd/control.rb +++ b/lib/bsd/control.rb @@ -23,7 +23,7 @@ module BSD::Control # @return [BSD::Control::Feature] # Returns an instance of BSD::Control::Feature. def self.feature!(name) - feature = Feature.available.find { _1.name == name } + feature = Feature.available.find { _1.name == name.to_s } feature ? feature : raise(Error, "feature '#{name}' wasn't found") end