This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Usage: ruby challenge.rb < dictionary.txt | |
class String | |
def insert_unique_four_char_sequences_into_hash(sequences) | |
tmp = self.dup | |
while tmp.size >= 4 | |
sequence = tmp[-4..-1] # Last 4 chars | |
if sequences[sequence] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break | |
your application: | |
* Support for Ruby 1.8.6 dropped | |
* Support for Rails 2 dropped | |
* Sass filter now always outputs <style> tags | |
* Data attributes are now hyphenated, not underscored | |
* html2haml utility moved to the html2haml gem | |
* Textile and Maruku filters moved to the haml-contrib gem |