require 'test/unit'class String def words scan(/\w[\w\'\-]*/) endenddef test_words assert_equal(%w{this is a test}, "this is a test".words) assert_equal(%w{these are mostly words}, "these are, mostly, words".words)end