Created
March 24, 2016 16:21
-
-
Save kiote/c370a15a99f693c30c7f to your computer and use it in GitHub Desktop.
Revisions
-
kiote renamed this gist
Mar 24, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kiote created this gist
Mar 24, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ irb(main):001:0> def a(b = {}) irb(main):002:1> puts b[:one] irb(main):003:1> end => :a irb(main):004:0> a => nil irb(main):005:0> a(nil) NoMethodError: undefined method `[]' for nil:NilClass from (irb):2:in `a' from (irb):5 from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/console.rb:110:in `start' from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/console.rb:9:in `start' from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:68:in `console' from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!' from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>' from /app/bin/rails:26:in `require' from /app/bin/rails:26:in `<main>'