From: Johann Hibschman Date: 2001-03-16T07:10:04+09:00 Subject: [ruby-talk:12699] Re: Keyword arguments? Michael Neumann writes: > But consider that keyword arguments can be emulated up to a certain degree by > hashes and special introduced syntax: > def method_with_keywords ( hash ); p hash end > method_with_keywords :key1 => "value", :key2 => 6565 #==> {:key2=>6565, :key1=>"value"} Why does that work? I must have missed that in the specs. That's crazy magic. But it's pretty usable as it is. It doesn't provide as much typo checking as, say, Python keywords do, but it's still nice. --J -- Johann Hibschman johann@physics.berkeley.edu