From: "Pedro CĂ´rte-Real" Date: 2006-07-25T19:33:38+09:00 Subject: Defining a method with an argument with a default value I have this line in a class method to define an initializer: define_method(:initialize){|value| @value = value} But I want something more like this: define_method(:initialize){|value=nil| @value = value if value} which doesn't seem to be possible because of the "value=nil" part. Is there some way to do this that isn't eval? Eval would work fine since this is pretty static code and I have unit tests for it but I try to avoid it if I can. I've only used it before for performance to turn some code with runtime tests into eval-time tests. Pedro.