This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def kikou(if:) | |
binding.local_variable_set(:if, binding.local_variable_get(:if) + 1) | |
binding.local_variable_get(:if) | |
end | |
kikou(if: 2) |
#ruby #php
#ruby #php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.describe [1, 2, 3] do | |
it { is_expected.to include(1) } | |
it { is_expected.not_to include(4) } | |
it { is_expected.to include(Fixnum) } | |
it { is_expected.to include(Object) } | |
it { is_expected.not_to include(Float) } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def can_close?(n, open, close) | |
open > close | |
end | |
def can_open?(n, open, close) | |
n > (open - close) | |
end | |
def par(res = '', n = 0, open = 0, close = 0) | |
if n == 0 |
results = for testValue in [false, [], 0, {}, '', null, undefined, (->), true, '0']
a = testValue
b = testValue
{
"value": testValue
'||=': a ||= 'assigned'
'?=': b ?= 'assigned'
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<blockquote class="twitter-tweet" lang="en"> | |
<p> | |
.<a href="https://twitter.com/NinthWardNYC">@NinthWardNYC</a> please bring the arrogant bastard back!!! | |
</p> | |
— Stefano B. (@jerefuse) <a href="https://twitter.com/jerefuse/status/525775452107833345">October 24, 2014</a> | |
</blockquote> | |
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> |
NewerOlder