connecting the dots . . .

Archive for

July 2011

Mike Ivanov

https://github.com/mikeivanov
http://www.linkedin.com/in/mikeivanov

Twitter
Mike Ivanov's profile »

Tags

  • postgres (4)
  • clojure (3)
  • crypto (3)
  • python (3)
  • ruby (3)
  • emacs (2)
  • lisp (2)
  • ssl (2)
  • bash (1)
  • buzzdata (1)
  • View all 43 tags »
  • ntfs (1)
  • stanford (1)
  • activestate (1)
  • ai (1)
  • amazon (1)
  • backup (1)
  • book (1)
  • caching (1)
  • cloud (1)
  • concurrency (1)
  • crypto python (1)
  • data (1)
  • dtes (1)
  • education (1)
  • eshell (1)
  • git (1)
  • howto (1)
  • ideas (1)
  • mac (1)
  • performance (1)
  • python crypto (1)
  • qa (1)
  • rant (1)
  • scalability (1)
  • shelter (1)
  • sql (1)
  • stats (1)
  • tcl/tk (1)
  • terminal (1)
  • threads (1)
  • usb (1)
  • web (1)
  • work (1)

Archive

2012 (1)
January (1)
2011 (13)
December (1)
September (1)
August (3)
July (1)
June (7)
Subscribe via RSS
July 8, 2011

Ruby keyword args

  • Edit
  • Delete
  • Tags
  • Autopost

This doesn't make any sense to me:

$ irb
ruby-1.9.2-p180 :001 > def nofun(a=nil, b=nil)
ruby-1.9.2-p180 :002?>   puts "a=#{a}, b=#{b}"
ruby-1.9.2-p180 :003?>   end
 => nil 
ruby-1.9.2-p180 :004 > nofun(b="b", a="a")
a=b, b=a
 => nil

Why?..

Filed under  //

  • ruby
Tweet
  • 0 responses
  • Like
  • Comment