more symbol related fixes

This commit is contained in:
Torsten Ruger
2015-06-01 17:31:35 +03:00
parent 5726d2c181
commit aea8f20be5
5 changed files with 22 additions and 20 deletions

View File

@ -30,6 +30,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'test'))
require 'salama'
module Virtual
# Functions to generate parfait objects
def self.new_word( string )
string = string.to_s if string.is_a? Symbol
word = Parfait::Word.new_object( string.length )
string.codepoints.each_with_index do |code , index |
word.set_char(index + 1 , code)
end
word
end
end
class Ignored
def == other
return false unless other.class == self.class

View File

@ -28,17 +28,7 @@ module VirtualHelper
end
end
module Virtual
# Functions to generate parfait objects
def self.new_word( string )
string = string.to_s if string.is_a? Symbol
word = Parfait::Word.new_object( string.length )
string.codepoints.each_with_index do |code , index |
word.set_char(index + 1 , code)
end
word
end
end
class UnusedSofEquality
# simple thought: don't recurse for Blocks, just check their names
def == other