lib/head_music/octave.rb in head_music-0.8.0 vs lib/head_music/octave.rb in head_music-0.10.0
- old
+ new
@@ -6,10 +6,9 @@
MATCHER = /(-?\d+)$/
def self.get(identifier)
from_number(identifier) || from_name(identifier) || default
end
- singleton_class.send(:alias_method, :[], :get)
def self.from_number(identifier)
return nil unless identifier.to_s == identifier.to_i.to_s
return nil unless (-2..12).include?(identifier.to_i)
@octaves ||= {}