Skip to content

Back from the grave (spooky!)

Latest
Compare
Choose a tag to compare
@YellowApple YellowApple released this 26 Oct 13:37

Not gonna lie, I kinda forgot about this, and then decided that it might come in handy for some new projects, so I figured I should probably make sure it works on a reasonably-modern Ruby (like, say, 2.7.0), and it does! Well, it does now.

Anyway, now when you do...

option :foo, type: String

action do |foo: 'bar'|
  puts foo
end

...Bales will stop letting OptionParser clobber that default with a nil if you don't invoke the command with a --foo option.