put this code in a file called string_extensions.rb:
class String def vowels self.scan(/[aeiou]/i) end end # And put this code in a file called vowel_test.rb: require 'string_extensions' puts "This is a test".vowels.join('-')