gr33n7007h has quit [Ping timeout: 244 seconds]
swaggboi has quit [Ping timeout: 244 seconds]
gearnode has quit [Ping timeout: 245 seconds]
swaggboi has joined #ruby
Cata has quit [Quit: Leaving]
lunarkitty has quit [Quit: Connection closed for inactivity]
<
viole>
I'm wondering, is there a way to initialize or increment a numeric var? (hypotetically) like this: (@verbose_variable ||= -1) += 1
<
viole>
so that it will be 0 when undefined, and +1 if already initialized
<
leftylink>
ah too bad, I sort of feel like that's exactly how I would write it, but apparently that syntax isn't accepted.
<
leftylink>
I guess it'll have to be @v = (@v || -1) + 1 then...
<
viole>
yeah, I was trying to avoid repeating that variable if at all possible
Garb0 has quit [Quit: Garb0]
<
havenwood>
viole: If possible, seems best to initialize it as zero. Otherwise, I'd think express that with two lines.
<
havenwood>
viole: @verbose_variable = @verbose_variable&.next.to_i
<
havenwood>
Nicest and most clear to: def initialize = @verbose_variable = 0
<
havenwood>
Second nicest to use two lines.
<
havenwood>
@verbose_variable ||= 0
<
havenwood>
@verbose_variable += 1
<
havenwood>
A &.succ.to_i duplicates the variable anyways so two lines seems nicer.
lunarkitty has joined #ruby
jetchisel has joined #ruby
FastJack has quit [Ping timeout: 272 seconds]
zodeishi has quit [Ping timeout: 245 seconds]
Guest65 has joined #ruby
<
viole>
first time I see & used that way
aeris22 has quit [Remote host closed the connection]
aeris22 has joined #ruby
* viole
is searching for documentation on that syntax
<
viole>
Safe Navigation Operator
FastJack has joined #ruby
dviola has joined #ruby
swaggboi has quit [Ping timeout: 258 seconds]
swaggboi has joined #ruby
dviola has quit [Quit: WeeChat 3.1]
arestifo has joined #ruby
jhass[m] has quit [Quit: Reconnecting]
jhass[m] has joined #ruby
Rounin has joined #ruby
Aighearach has quit [Remote host closed the connection]
Aighearach has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
aeris22 is now known as aeris
gearnode has joined #ruby
involans has joined #ruby
lunarkitty has joined #ruby
postmodern has quit [Quit: Leaving]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
justBull has quit [Remote host closed the connection]
justBull has joined #ruby
chromis has quit [Ping timeout: 248 seconds]
chromis has joined #ruby
Guest65 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unyu has quit [Quit: WeeChat 3.1]
arestifo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arestifo has joined #ruby
nmollerup has joined #ruby
Fusl has quit [Quit: freenode]
Fusl has joined #ruby
aeris has quit [Remote host closed the connection]
pwnd_sfw has quit [Quit: Ping timeout (120 seconds)]
pwnd_sfw has joined #ruby
patrick has joined #ruby
dostoyevsky2 has quit [Ping timeout: 264 seconds]
dostoyevsky2 has joined #ruby
dostoyevsky2 has quit [Ping timeout: 258 seconds]
dostoyevsky2 has joined #ruby
arestifo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lunarkitty has quit [Quit: Connection closed for inactivity]
Garb0 has joined #ruby
aeris has joined #ruby
arestifo has joined #ruby
arestifo has quit [Client Quit]
arestifo has joined #ruby
arestifo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zodeishi has joined #ruby
Garb0 has quit [Quit: Garb0]
involans has quit [Ping timeout: 252 seconds]
involans has joined #ruby
arestifo has joined #ruby
Garb0 has joined #ruby
Garb0 has quit [Remote host closed the connection]
Garb0 has joined #ruby
Garb0 has quit [Remote host closed the connection]
Garb0 has joined #ruby
jetchisel has quit [Ping timeout: 252 seconds]
erb has joined #ruby
aesthetikx has joined #ruby
abhijit has joined #ruby
<
abhijit>
Hi all. does rbenv support installing version not listed?
<
jhass>
I don't know, try it!
<
aesthetikx>
Is it an older version, a newer one, or a minor version not listed?
<
abhijit>
rbenv install 2.7.3
<
abhijit>
ruby-build: definition not found: 2.7.3
<
aesthetikx>
I have that one as available, do you have to update ruby-build? e.g., cd ~/.rbenv/plugins/ruby-build ; git pull
<
abhijit>
yes. that solved it. Thanks. so do I need to do this regularly? is it not automatic?
jhass[m] has quit [Remote host closed the connection]
jhass[m] has joined #ruby
<
havenwood>
abhijit: or you can update ruby-build itself, along with other packages
Garb0 has quit [Ping timeout: 264 seconds]
Garb0 has joined #ruby
gr33n7007h has joined #ruby
Garb0 has quit [Ping timeout: 258 seconds]
Garb0 has joined #ruby
abhijit has quit [Quit: Leaving]
reset has quit [Quit: reset]
erb has quit [Read error: Connection reset by peer]
erb has joined #ruby
caleb has quit [*.net *.split]
joenoon has quit [*.net *.split]
benjaminwil has quit [*.net *.split]
moo has quit [*.net *.split]
rapha has quit [*.net *.split]
eam has quit [*.net *.split]
wmoxam has quit [*.net *.split]
gigamo has quit [*.net *.split]
bhaak has quit [*.net *.split]
eam_ has joined #ruby
moo has joined #ruby
bhaak has joined #ruby
wmoxam has joined #ruby
bhaak has quit [Changing host]
bhaak has joined #ruby
joenoon has joined #ruby
caleb has joined #ruby
rapha has joined #ruby
gigamo has joined #ruby
Qchmqs has joined #ruby
rapha has quit [Changing host]
rapha has joined #ruby
arestifo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arestifo has joined #ruby
arestifo has quit [Client Quit]
erb has quit [Ping timeout: 245 seconds]
Garb0 has quit [Quit: Garb0]
podge has joined #ruby
patrick has quit [Quit: WeeChat 3.0.1]
Guest65 has joined #ruby
Guest65 has quit [Client Quit]
benjaminwil has joined #ruby
Qchmqs has quit [Remote host closed the connection]
Guest65 has joined #ruby
podge has quit [Quit: WeeChat 3.0.1]
patrick has joined #ruby
Guest65 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chonkbit has joined #ruby
Garb0 has joined #ruby
<
aesthetikx>
I guess that is mostly, but not all, rails related, oops.
<
leftylink>
well, at least 3 is not, so there's that at least
<
leftylink>
however, it's wrong because _ is not a method (`defined?(_)` says "local variable")
<
aesthetikx>
yes I have noticed that in some contexts _ doesn't seem to work and in others it does, I never dug in to find out why
<
leftylink>
it's a local variable no different at a language level from any other local variables
<
leftylink>
whether it will work depends solely on whether it has been set
<
leftylink>
I feel like destroy vs delete could do with an explanation
mrkz_c has joined #ruby
<
aesthetikx>
there is also now #destroy_async I believe
lunarkitty has joined #ruby
gearnode has quit [Ping timeout: 272 seconds]
Garb0 has quit [Quit: Garb0]
d0htem has quit [Quit: Connection closed for inactivity]
gearnode has joined #ruby
Garb0 has joined #ruby
gearnode has quit [Ping timeout: 268 seconds]
swaggboi has quit [Read error: Connection reset by peer]
chonkbit has quit [Ping timeout: 250 seconds]
TorpedoSkyline has quit [Quit: Konversation terminated!]
motherr_ has quit [Read error: Connection reset by peer]
involans has quit [Ping timeout: 258 seconds]
motherr has joined #ruby
gearnode has joined #ruby
xuochi has joined #ruby
xuochi has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby