From: Nikolai Weibull Date: 2011-10-14T22:28:55+09:00 Subject: Re: What’s the best way of checking if an argument has been given or not? On Fri, Oct 14, 2011 at 15:07, jake kaiden wrote: > ...probably not the *best* way, but this works: > >  class A >  def initialize(arg = "NO ARGUMENT") >    if arg == "NO ARGUMENT" >      puts "no argument given" >    else >      puts arg >    end >  end >  end Perhaps I wasn’t clear enough. It shouldn’t be possible for the caller to actually pass in an argument that will match. A.new('NO ARGUMENT') # => no argument given