Skip to content

Instantly share code, notes, and snippets.

@amatsuda
Created November 1, 2016 09:32
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 amatsuda/ec83ab33872bf79f699d4b11d265f40c to your computer and use it in GitHub Desktop.
Save amatsuda/ec83ab33872bf79f699d4b11d265f40c to your computer and use it in GitHub Desktop.
# Question: which module would raise an error?
module I
include
end
module P
prepend
end
module X
extend
end
% ruby -v include_prepend_extend_nothing.rb
ruby 2.4.0dev (2016-11-01 trunk 56535) [x86_64-darwin15]
include_prepend_extend_nothing.rb:10:in `extend': wrong number of arguments (given 0, expected 1+) (ArgumentError)
from include_prepend_extend_nothing.rb:10:in `<module:X>'
from include_prepend_extend_nothing.rb:9:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment