Skip to content

Conversation

@vijay-koppala
Copy link
Contributor

@vijay-koppala vijay-koppala commented Oct 22, 2016

||= is a deceiving operator for Boolean values. It could mean, assign-if-nil or assign-if-false. It is just a short-hand for a = a || new_value

||= is a deceiving operator for Boolean values. It could mean assign-if-nil or assign-if-false. It is just a short-hand for `a = a || new_value`
@vijay-koppala vijay-koppala changed the title Don't reset use_utf16 option, when tried to initialize with false Don't reset use_utf16 option, when initializing with false Oct 22, 2016
@metaskills
Copy link
Member

Thanks... maybe we should use idiomatic Ruby instead. Would this work?

opts[:use_utf16] = opts.fetch(:use_utf16) { true }

@metaskills metaskills merged commit f216e3d into rails-sqlserver:master Nov 27, 2016
@metaskills
Copy link
Member

Actually, I like this better. Merged in :)

metaskills added a commit that referenced this pull request Nov 27, 2016
aharpervc pushed a commit to aharpervc/tiny_tds that referenced this pull request Apr 9, 2020
…server#314)

* Don't reset use_utf16 option, when tried to initialize with false

||= is a deceiving operator for Boolean values. It could mean assign-if-nil or assign-if-false. It is just a short-hand for `a = a || new_value`

* Considered non-existence option as true

* Initialized "use_utf16" Ruby Symbol Object
aharpervc pushed a commit to aharpervc/tiny_tds that referenced this pull request Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants