opts.on("-p", "--port NUM", "Port for web server (defaults to #{conf.port})")To fix this particular instance, just change it into this:
{ |conf.port| }
opts.on("-p", "--port NUM", "Port for web server (defaults to #{conf.port})")Not much of a difference, really. On all places where assignment to a non-obvious node is done in the manner above, just replace it with a regular assignment, and Camping will run.
{ |v| conf.port=v }
Now, we are planning on fixing this syntax, but there is much development going down right now, and this change requires some changes in the parser, which is always interesting. But it will be there.
3 kommentarer:
I believe matz is removing this behavior from future versions of ruby, as it is actually an accidental side effect rather than a feature added on purpose.
Yes, that's true. He is removing it in the next version. But that's a year from now. And during that year, Camping will not run. I will not have it that way! =)
FREE Business Advertising Tips The Most Powerful Internet Classified Advertising Methods On The Web! "TOP" Rated Money Making Website! A Must See!!!
Skicka en kommentar