lib/rb-inotify/native/flags.rb in rb-inotify-0.7.0 vs lib/rb-inotify/native/flags.rb in rb-inotify-0.7.1
- old
+ new
@@ -77,10 +77,10 @@
# Converts a bitmask from the C API into a list of flags.
#
# @param mask [Fixnum]
# @return [Array<Symbol>]
def self.from_mask(mask)
- constants.select do |c|
+ constants.map {|c| c.to_s}.select do |c|
next false unless c =~ /^IN_/
const_get(c) & mask != 0
end.map {|c| c.sub("IN_", "").downcase.to_sym} - [:all_events]
end
end