Alternate Array Notation

Submitted By:
david

Difficulty:
Elementary

Tags:
arrays

Instructions:
There's a set of shortcuts that are useful for defining strings, arrays, regular expressions, and even shell commands. Here we use the one for arrays.

Code:
assert_equal ___(hello world), ["hello", "world"]
assert_equal ___{1 2 3 4}, ["1", "2", "3", "4"]
assert_equal ___?remembrance of things past?, ["remembrance", "of", "things", "past"]

Your Solution

Ruby 1.9.3

Back to Problems