reinstate word creation and use for strings

so string constants become words, so we can fiddle with them
This commit is contained in:
Torsten Ruger
2015-11-08 23:58:35 +02:00
parent c8fa5238ee
commit f746218765
3 changed files with 14 additions and 15 deletions

View File

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