Accept a Symbol in BSD::Control.feature!
This commit is contained in:
parent
9a25d72d34
commit
a768d11ed9
2 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue