I think that !! is not necessary. #54

Closed
wants to merge 1 commit into
from

2 participants

@tapajos

No description provided.

@gabebw
thoughtbot, inc. member

I actually prefer to return real booleans, rather than "something that isn't nil or false". Sorry!

@gabebw gabebw closed this Sep 12, 2011
@tapajos

Default value is false and if we change:

opts.on("-p", "--pretend", "Pretend mode: print what kumade would do") do |p|
    @options[:pretend] = p
end

for this

opts.on_tail("-p", "--pretend", "Pretend mode: print what kumade would do") do
    @options[:pretend] = true
end

We can remove "!!".

@options[:pretend] = p no make sense.

Can I change it?

@tapajos

Done. Close again if you think that I'm wrong.

@tapajos

Ops, I can't reopen this pull request.

@gabebw
thoughtbot, inc. member

Fair enough. Fixed it in ea5331d.

@tapajos

I pushed this code. I don't know why it is not here but it is in my branch.

Now I think that !! can be removed. Right?

@gabebw
thoughtbot, inc. member

Yep, I'll do that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment