Skip to content

Instantly share code, notes, and snippets.

@nrocy
Created October 26, 2010 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrocy/646146 to your computer and use it in GitHub Desktop.
Save nrocy/646146 to your computer and use it in GitHub Desktop.
ExtractConstant Bug
# 1. Save this all as a file somewhere, open in Vim
# 2. Move the cursor to inside the string below, and cast this spell (followed by <CR>): "ayiW@a
13jf3viw,recTHREE
class AboutArrays < EdgeCase::Koan
def test_creating_arrays
empty_array = Array.new
assert_equal Array, empty_array.class
assert_equal 0, empty_array.size
end
def test_slicing_arrays
array = [:peanut, :butter, :and, :jelly]
assert_equal [:peanut], array[0,1]
magic_number = 333
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment