change `!true` to `unless` #9950

wants to merge 1 commit into


None yet

2 participants


Change condition to use unless instead

@rafaelfranca rafaelfranca and 1 other commented on an outdated diff Mar 27, 2013
@@ -297,6 +297,7 @@ def release_connection(with_id = current_connection_id)
# exists checkout a connection, yield it to the block, and checkin the
# connection when finished.
def with_connection
+ fresh_connection =nil
connection_id = current_connection_id
fresh_connection = true unless active_connection?
rafaelfranca Mar 27, 2013 Ruby on Rails member

I don't thin we need to ensure the initialization. Ruby will handle this one:

>> foo = 1 unless true
=> nil
>> foo
=> nil
vipulnsward Mar 27, 2013 Ruby on Rails member

ah, right, I missed this while testing, will update


@rafaelfranca updated


Right now this change is under the cosmetic category so I prefer to not merge.

Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of Rails will generally not be accepted.

Thank you so much.



@vipulnsward vipulnsward deleted the vipulnsward:change_not_true_to_unless branch Mar 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment