Skip to content

Instantly share code, notes, and snippets.

@JacobNinja
Created November 23, 2014 15:47
Show Gist options
  • Select an option

  • Save JacobNinja/f5fda976f38d23477547 to your computer and use it in GitHub Desktop.

Select an option

Save JacobNinja/f5fda976f38d23477547 to your computer and use it in GitHub Desktop.

Revisions

  1. JacobNinja created this gist Nov 23, 2014.
    10 changes: 10 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    class NilClass
    def to_a
    p 'calling to_a within NilClass'
    []
    end
    end

    # irb(main):017:0> [*nil]
    # "calling to_a within NilClass"
    # => []