lib/head_music/interval.rb in head_music-0.1.1 vs lib/head_music/interval.rb in head_music-0.1.5
- old
+ new
@@ -7,10 +7,10 @@
attr_reader :semitones
def self.get(semitones)
@intervals_memo ||= {}
- @intervals_memo[semitones] ||= new(semitones)
+ @intervals_memo[semitones.to_i] ||= new(semitones.to_i)
end
def self.named(name)
name = name.to_s
get(NAMES.index(name)) if NAMES.include?(name)