Skip to content

Instantly share code, notes, and snippets.

@erik-megarad
Created October 10, 2011 20:17
Show Gist options
  • Save erik-megarad/1276392 to your computer and use it in GitHub Desktop.
Save erik-megarad/1276392 to your computer and use it in GitHub Desktop.
epeterson@ep:~/Sites/rubinius locks ✔ ⇧ $ bin/mspec ci -T -X19 spec/ruby/core/array/rotate_spec.rb
rubinius 2.0.0dev (1.9.2 f145b1bb yyyy-mm-dd JI) [x86_64-apple-darwin10.8.0]
EEEEEEEEF
1)
Array#rotate returns a copy of the array whose first n elements is moved to the last ERROR
NoMethodError: undefined method `rotate' on an instance of Array.
Kernel(Array)#rotate (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:8
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:5
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
2)
Array#rotate returns a copy of the array when the length is one ERROR
NoMethodError: undefined method `rotate' on an instance of Array.
Kernel(Array)#rotate (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:16
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:5
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
3)
Array#rotate returns an empty array when self is empty ERROR
NoMethodError: undefined method `rotate' on an instance of Array.
Kernel(Array)#rotate (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:22
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:5
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
4)
Array#rotate does not return self ERROR
NoMethodError: undefined method `rotate' on an instance of Array.
Kernel(Array)#rotate (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:28
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:5
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
5)
Array#rotate returns subclass instance for Array subclasses ERROR
NoMethodError: undefined method `rotate' on an instance of ArraySpecs::MyArray.
Kernel(ArraySpecs::MyArray)#rotate (method_missing) at kernel/delta
/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:33
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:5
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
6)
Array#rotate! moves the first n elements to the last and returns self ERROR
NoMethodError: undefined method `rotate!' on an instance of Array.
Kernel(Array)#rotate! (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:47
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:44
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
7)
Array#rotate! does nothing and returns self when the length is zero or one ERROR
NoMethodError: undefined method `rotate!' on an instance of Array.
Kernel(Array)#rotate! (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:62
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:44
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
8)
Array#rotate! returns self ERROR
NoMethodError: undefined method `rotate!' on an instance of Array.
Kernel(Array)#rotate! (method_missing) at kernel/delta/kernel.rb:79
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:78
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:44
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
9)
Array#rotate! raises a RuntimeError on a frozen array FAILED
Expected RuntimeError
but got NoMethodError (undefined method `rotate!' on an instance of Array.)
/expectations.rb:15
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:82
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
{ } in Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
Enumerable(Array)#all? at kernel/common/enumerable.rb:235
Array#each at kernel/bootstrap/array.rb:66
{ } in Object#__script__ at spec/ruby/core/array/rotate_spec.rb:44
Object#__script__ at spec/ruby/core/array/rotate_spec.rb:4
Kernel.load at kernel/common/kernel.rb:687
BasicObject(Object)#instance_eval at kernel/common/eval19.rb:43
Array#each at kernel/bootstrap/array.rb:66
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:618
Rubinius::Loader#main at kernel/loader.rb:772
Finished in 0.011004 seconds
1 file, 9 examples, 1 expectation, 1 failure, 8 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment