Skip to content

Instantly share code, notes, and snippets.

@slawosz
Created August 17, 2015 21:10
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 slawosz/8db7fc43e01b9d003564 to your computer and use it in GitHub Desktop.
Save slawosz/8db7fc43e01b9d003564 to your computer and use it in GitHub Desktop.
def foo(a,b=nil)
if a.is_a? Array
puts "array"
else
puts a
puts b
end
end
foo([1,2,3])
foo(:bar, :baz)
foo(:rubyiscool)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment