-
-
Save tubbo/298d6558592ca9bdc984 to your computer and use it in GitHub Desktop.
This file contains 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 characters
irb(main):002:0> module Foo; def const_missing(constant); puts "nope: #{constant}"; end; end; | |
irb(main):003:0* Foo::BAR | |
NameError: uninitialized constant Foo::BAR | |
from (irb):3 | |
from /Users/tscott/.rubies/ruby-2.2.2/bin/irb:11:in `<main>' | |
irb(main):004:0> module Foo; def self.const_missing(constant); puts "nope: #{constant}"; end; end; | |
irb(main):005:0* Foo::BAR | |
nope: BAR | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment