adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.1, 2.7.3, 2.6.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
fercell has joined #ruby
<rapha> the guy is an effin' _crown_prince_?! o_O
_rg has quit [Quit: WeeChat 1.9.1]
_rg has joined #ruby
_rg has quit [Quit: WeeChat 1.9.1]
_rg has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Rakko has quit [Quit: Leaving]
jenrzzz has joined #ruby
_rg has quit [Quit: WeeChat 1.9.1]
_rg has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
EvilJStoker has quit [Write error: Connection reset by peer]
EvilJStoker has joined #ruby
ur5us__ has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
bambanx has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
jenrzzz has joined #ruby
<CalimeroTeknik> rapha, that means nothing
jenrzzz has quit [Ping timeout: 240 seconds]
<CalimeroTeknik> it's internal shenanigans of aristocratic families between themselves in what is now a republic that doesn't care about it
<CalimeroTeknik> (except their money)
ur5us__ has joined #ruby
Technodrome has joined #ruby
evdubs_ has joined #ruby
jenrzzz has joined #ruby
evdubs has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
evdubs_ is now known as evdubs
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
evdubs has left #ruby ["Leaving"]
_rg has quit [Quit: brb]
_rg has joined #ruby
robotbee has quit [Remote host closed the connection]
robotbee has joined #ruby
jenrzzz has joined #ruby
robotbee has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
BiHi has quit [Remote host closed the connection]
grvgr_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
grvgr_ has left #ruby [#ruby]
gix has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
bambanx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
jmcgnh has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 3.1]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jmcgnh has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
fercell has quit [Ping timeout: 268 seconds]
RandomArcher has joined #ruby
mangold has joined #ruby
RandomArcher has quit [Client Quit]
jenrzzz has joined #ruby
fercell has joined #ruby
TK__ has quit [Ping timeout: 258 seconds]
pwnd_7 has joined #ruby
pwnd_ has quit [Read error: Connection reset by peer]
pwnd_7 is now known as pwnd_
jenrzzz has quit [Ping timeout: 265 seconds]
robotbee has joined #ruby
jenrzzz has joined #ruby
mangold has quit [Ping timeout: 260 seconds]
mangold has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ChmEarl has quit [Quit: Leaving]
jenrzzz has joined #ruby
deviantfero has joined #ruby
mangold has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ruby
mangold has joined #ruby
robotbee has quit [Ping timeout: 240 seconds]
Hess has quit [Remote host closed the connection]
Arthur_ has joined #ruby
_whitelogger has joined #ruby
_rg has quit [Quit: WeeChat 1.9.1]
m27frogy has quit [Ping timeout: 258 seconds]
mangold has quit [Ping timeout: 260 seconds]
mangold has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
kapil_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
kapil_ has joined #ruby
thecoffemaker has quit [Quit: So long and thanks for all the fish!]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robotbee has joined #ruby
mangold has quit [Ping timeout: 265 seconds]
dinfuehr has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
kapil_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
kapil_ has joined #ruby
jetchisel has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
jetchisel has joined #ruby
jetchisel has quit [Max SendQ exceeded]
jetchisel has joined #ruby
jamees has joined #ruby
wootcakes has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
ur5us__ has quit [Ping timeout: 258 seconds]
wootcakes has quit [Quit: Connection closed]
jackjkal has joined #ruby
jnoon has quit []
jla has joined #ruby
jackjkal has quit [Quit: Textual IRC Client: www.textualapp.com]
TK__ has joined #ruby
jackjkal has joined #ruby
DaniG2k has joined #ruby
jackjkal has quit [Client Quit]
robotbee has quit [Ping timeout: 260 seconds]
jamees has quit [Quit: Ping timeout (120 seconds)]
jamees has joined #ruby
DaniG2k has quit [Quit: leaving]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
teclator has joined #ruby
kluk has quit [Quit: Connection closed]
mangold has joined #ruby
jamees has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jamees has joined #ruby
al2o3-cr has quit [Quit: WeeChat 3.1]
jla has quit [Ping timeout: 260 seconds]
feriman has joined #ruby
deviantfero has quit [Ping timeout: 265 seconds]
mangold has quit [Ping timeout: 260 seconds]
meinside has quit []
deviantfero has joined #ruby
kapil_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
kapil_ has joined #ruby
integral has quit [Ping timeout: 260 seconds]
Net has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
poguez_ has quit [Read error: Connection reset by peer]
d10n-work has quit [Ping timeout: 260 seconds]
cstrahan has quit [Ping timeout: 260 seconds]
BuildTheRobots has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
integral has joined #ruby
cstrahan has joined #ruby
poguez_ has joined #ruby
Net has joined #ruby
c355e3b has quit [Ping timeout: 245 seconds]
BuildTheRobots has joined #ruby
hahuang65 has joined #ruby
d10n-work has joined #ruby
hahuang65 has quit [Max SendQ exceeded]
c355e3b has joined #ruby
hahuang65 has joined #ruby
bitwinery has quit [Quit: Leaving]
jenrzzz has joined #ruby
jla has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
LACampbell has left #ruby ["WeeChat 2.8"]
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
woodruffw has quit [Ping timeout: 252 seconds]
woodruffw has joined #ruby
woodruffw has quit [Changing host]
woodruffw has joined #ruby
jenrzzz has joined #ruby
nertzy_ has quit [Read error: Connection reset by peer]
deviantfero has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
ur5us__ has joined #ruby
FastJack has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
jenrzzz has quit [Ping timeout: 260 seconds]
SpacePlod has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
RougeR has joined #ruby
Default__ has joined #ruby
SpacePlod has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Default__ has quit [Client Quit]
ur5us__ has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
cuerbot has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
jamees has quit [Quit: Connection closed]
Glumetu has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<Glumetu> Hello i would like to ask for a link of documentation about this situation ... i calculate the value for a variable inside a loop and i can't seem to be able to use it or print it outside the loop.
ur5us has joined #ruby
jenrzzz has joined #ruby
<_aeris_> Glumetu > define your variable outside the loop initially
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
<_aeris_> loop use a block, and block uses a different scope for variable, so if not defined outside the block first, the variable is only available from the block scop
jenrzzz has quit [Ping timeout: 240 seconds]
<_aeris_> so 10.times { a = 1 } p(a) doesn't work, a not defined after the block, but a=nil; 10.times { a = 1 } p(a) works
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TK__ has quit [Ping timeout: 258 seconds]
<Glumetu> Thank you so much _aeris_
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
henninb has joined #ruby
FastJack has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
_nick_ has joined #ruby
Bounga has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
feriman has quit [Quit: WeeChat 3.1]
jenrzzz has quit [Ping timeout: 240 seconds]
Bounga has quit [Ping timeout: 246 seconds]
TCZ has joined #ruby
jetchisel has quit [Ping timeout: 265 seconds]
c355e3b has quit []
jenrzzz has joined #ruby
_nick_ has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
jetchisel has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
m27frogy has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
Default__ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<Default__> I'm trying to create a updateable content but having problems with the syntax for the variable. I'm a beginner. Is anyone interested in helping quick?
<jhass> it's best to just describe your problem in detail rather than looking for an expert upfront :)
tens0r has joined #ruby
tens0r has left #ruby [#ruby]
<Default__> ok so I'm making the meta description updateable. I've generated an SeoContentModel. Then I've created the table and meta title,meta description in a migration file. I've also added another method to add dummy content there. I have a seo_content model with just the class in. In the home controller I have "@meta_description = CreateSeoContents.seo_contents.meta_description" which comes back with a name error
tensor-dev has joined #ruby
tensor-dev has quit [Read error: Connection reset by peer]
rkoller has joined #ruby
jenrzzz has joined #ruby
rkoller has quit [Client Quit]
Default__ has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
dviola has joined #ruby
jenrzzz has joined #ruby
cek has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
arooni has quit [Quit: ZNC - http://znc.in]
split-brain has joined #ruby
henninb has quit [Quit: Lost terminal]
arooni has joined #ruby
jenrzzz has joined #ruby
<cek> hel
<cek> lo. can't get what tools are missing building this ext: from /usr/local/rbenv/versions/2.6.6/lib/ruby/2.6.0/mkmf.rb:552:in `try_link0'
<cek> hmm... stat("Makefile", 0x7ffeaa212910) = -1 ENOENT (No such file or directory)
<jhass> we gonna need the entire output and the mkmf.log in a gist
jenrzzz has quit [Ping timeout: 265 seconds]
<jhass> yeah, gonna need mkmf.log, the full error output should mention the path to it somewhere
<cek> ok finally /usr/bin/ld: cannot find -lgmp
<jhass> there you go
cek has left #ruby ["tnx"]
jenrzzz has joined #ruby
LenPayne_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
jenrzzz has quit [Ping timeout: 260 seconds]
neozor has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
bamdad_ has quit [Write error: Connection reset by peer]
iNs has quit [Read error: Connection reset by peer]
iNs has joined #ruby
bamdad has joined #ruby
Bounga has joined #ruby
jenrzzz has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
tomaw has quit [Changing host]
tomaw has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
TCZ has quit [Quit: ...]
jla has left #ruby [#ruby]
deviantfero has joined #ruby
jenrzzz has joined #ruby
va5c0 has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
va5c0 has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
alestane has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
mbrndtgn has left #ruby ["The Lounge - https://thelounge.chat"]
<alestane> Hello; I'm dealing with a situation where a variable might contain a hash with existing pairs, or might contain Nil. If there's a hash there, I want to add a new pair to it; if there isn't, I want to set the variable to hold a new hash containing only that pair. I can certainly do this fairly clumsily, but is there a standard clean idiom for it? Google has so far yielded only tutorials about basic hash use.
jenrzzz has joined #ruby
<leftylink> interesting. I'd use Hash#merge, and || for the case when it's nil.
vondruch has quit [Client Quit]
<jhass> I'd look into any way there's to change whatever place the nil's coming from to return an empty hash instead
vondruch has joined #ruby
arahael has left #ruby ["WeeChat 2.7.1"]
ChmEarl has joined #ruby
<jhass> but if that's impossible, (foo ||= {}).merge!(key: :value) for modifying or foo = (foo || {}).merge(key: :value) ain't too bad
vondruch has quit [Client Quit]
vondruch has joined #ruby
<alestane> The ||= operator looks like the key I was missing, I'lll test a couple approaches. Unfortunately the target location is an index in an array, which sounds like it doesn't do default values well.
jenrzzz has quit [Ping timeout: 240 seconds]
<jhass> .fetch(n, {})
<alestane> Will that add the new hash to the array as well?
<jhass> no
<leftylink> it's not clear to me why the array poses a problem - would it not mean that foo in the above examples just becomes a[i] ? all examples above would still work there
<leftylink> maybe the array is elsewhere and thus I've just misunderstood
<alestane> (arr[i] ||= {})[k] = v appears to work fine.
<jhass> a non-continous array might want to actually be a hash however and then you could do Hash.new {|h, k| h[k] ||= {} }
<alestane> The biggest reason I want it to be an array is to order things. They will be mostly contiguous.
<alestane> But I have to be ready for occasional bits of broken user entry.
MalkbabY has quit [Remote host closed the connection]
<alestane> Validation would help, but I've also learned to be leery of the assumption that all user data in the store is clean and valid.
<alestane> I think this is what I was looking for, very much appreciated.
MalkbabY has joined #ruby
<jhass> gladly :)
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
jenrzzz has joined #ruby
vondruch has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
gr33n7007h has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Nowaker has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Rudd0 has quit [Ping timeout: 268 seconds]
neozor has quit [Remote host closed the connection]
howdoi has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jamees has joined #ruby
va5c0 has quit [Ping timeout: 265 seconds]
va5c0 has joined #ruby
tomaw has quit [Quit: Quitting]
gr33n7001 has joined #ruby
centrx has joined #ruby
jenrzzz has joined #ruby
gr33n7007h has quit [Ping timeout: 260 seconds]
jamees has quit [Quit: Connection closed]
jenrzzz has quit [Ping timeout: 246 seconds]
centrx_ has joined #ruby
jenrzzz has joined #ruby
centrx has quit [Ping timeout: 258 seconds]
mangold has joined #ruby
robotbee has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
cd has quit [Quit: cd]
cd has joined #ruby
cd has quit [Client Quit]
robotbee has quit [Ping timeout: 265 seconds]
Glumetu has left #ruby [#ruby]
cthu| has joined #ruby
jenrzzz has joined #ruby
alestane has quit [Quit: alestane]
jenrzzz has quit [Ping timeout: 260 seconds]
<rapha> see y'all on the other side, it was a good time here!
rapha has left #ruby ["switching to libera"]
Bounga has quit [Ping timeout: 240 seconds]
pinkpandabot is now known as pandabot
gr33n7001 has quit [Quit: WeeChat 3.1]
Nowaker has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
robotbee has joined #ruby
jenrzzz has joined #ruby
cd has joined #ruby
mangold has quit [Ping timeout: 240 seconds]
cd has quit [Client Quit]
centrx_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
<nakilon> he's still connected to Freenode, just idle, so what's the point
Azure has joined #ruby
feriman has joined #ruby
lightstalker has quit [Read error: Connection reset by peer]
centrx has joined #ruby
centrx has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
s2013 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has joined #ruby
jenrzzz has joined #ruby
centrx has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
centrx has quit [Ping timeout: 258 seconds]
eddof13 has joined #ruby
Rudd0 has joined #ruby
jenrzzz has joined #ruby
dviola has left #ruby ["WeeChat 3.1"]
jenrzzz has quit [Ping timeout: 260 seconds]
mangold has quit [Ping timeout: 260 seconds]
LiteWait has joined #ruby
mangold has joined #ruby
jenrzzz has joined #ruby
centrx_ has joined #ruby
centrx_ has quit [Ping timeout: 258 seconds]
miah has quit [Quit: DevOps? DerpOps maybe!]
cd has joined #ruby
cd has quit [Client Quit]
cd has joined #ruby
cd has quit [Client Quit]
cd has joined #ruby
_whitelogger has joined #ruby
cd has quit [Client Quit]
cd has joined #ruby
cd has quit [Client Quit]
sysadmin has joined #ruby
LiteWait has quit [Quit: Connection closed]
cd has joined #ruby
_whitelogger has joined #ruby
duderonomy has joined #ruby
jla has joined #ruby
centrx has joined #ruby
centrx has quit [Ping timeout: 258 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
centrx has joined #ruby
mangold_ has joined #ruby
mangold has quit [Ping timeout: 260 seconds]
centrx has quit [Ping timeout: 258 seconds]
teclator has quit [Ping timeout: 245 seconds]
clinth has left #ruby [#ruby]
<fowl> is WEBrick::HTTPUtil.quote supposed to remove "s inside? it replaces them with \
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
lightstalker has joined #ruby
dviola has joined #ruby
<sysadmin> Remember Bitcoin in 2008??? Pi is a new digital currency developed by Stanford PhDs, To claim your piece of pi goto https://minepi.com and use "ilkde" as your invitation code. Get your piece of the pi now !
<jhass> !spam sysadmin
sysadmin was kicked from #ruby by ruby[bot] [spamming is a bannable offense, see http://ruby-community.com/pages/user_rules]
<jhass> fowl: yeah seems weird, the implementation seems to want to use a backreference but doesn't even define a capture group. Anyways, I doubt it's considered public API and even if it were I wouldn't use it in new code since webrick is dropped from the standard library in Ruby 3
sysadmin has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
eris has joined #ruby
Na_Klar has joined #ruby
feriman has quit [Quit: WeeChat 3.1]
feriman has joined #ruby
eris has quit [Remote host closed the connection]
eris has joined #ruby
split-brain has quit [Remote host closed the connection]
mangold_ has quit [Ping timeout: 240 seconds]
Na_Klar has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall.]
mangold_ has joined #ruby
mangold_ has quit [Ping timeout: 265 seconds]
Qchmqs has joined #ruby
RougeR has quit [Remote host closed the connection]
EvanR has joined #ruby
eris has quit [Remote host closed the connection]
cek has joined #ruby
<cek> why the heck would rubygems try to download ALL gems during `bundle install`?
<cek> i[m mirroring wiht `gemirro` and don't want to pull all internet.
<adam12> cek: What’s the output say?
<Qchmqs> rubygems doesn't download all the internet, you're thinking of npm
<cek> despite temple resolving to 0.8.2 just fine.
<adam12> cek: Sometimes if Bundler can’t determine a certain way to resolve a dependency it will fetch a full index. Maybe that’s what you’re seeing? I dont’ remember the exact logic tho.
<cek> yes it does: Need to query more than 500 gems. Downloading full index instead...
<cek> is the Marshalled stuff what's called a 'full index'?
<cek> I thought it was specs.4.8.gz
<cek> why doesn't it fetch that file goddamit?
<adam12> cek: This is your mirror?
<cek> mine!
<cek> cek> i[m mirroring wiht `gemirro` and don't want to pull all internet.
jla has left #ruby [#ruby]
gix has joined #ruby
klaas has left #ruby ["The Lounge - https://thelounge.github.io"]
GodFather has quit [Ping timeout: 252 seconds]
<cek> it appears that was indeed coming from specs.4.8.gz being loaded and parsed and those lower gem versions extracted and looked up. All because gemirro just downloaded that file from rubygems instead of generating from gems it fetched.
<cek> thanks guys!
vondruch_ has joined #ruby
felipec has joined #ruby
vondruch_ has quit [Client Quit]
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
<felipec> Does it make sense to set a module class with code? https://dpaste.com/G2AUKEBE9
<felipec> Err, module variable
pyra has joined #ruby
<jhass> this is called a class variable and there's very very few legit usecases for them. Use a constant if you never reassign it or a class/module level instance variable if you do
cliluw has quit [Ping timeout: 265 seconds]
<felipec> jhass: I did not ask how else would you do it, I asked if that code makes sense
GodFather has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
<felipec> A constant will leak to the user's of this library: they could do Test::ROOT_DIR
<jhass> not that I would care about such
<havenwood> felipec: No, class variables never make sense.
<havenwood> felipec: They are broken by design and only remain in the language for backwards compatibility.
<havenwood> felipec: Do *not* create class variables. Matz recommends avoiding class variables.
<felipec> I'm still waiting for anybody to explain what is wrong
<leftylink> moving goalposts detected
<pyra> I honestly don't see why it's wrong to use class vars as constants. **provided you never change them and you never try to reassign them in children or parents**
cthu| has quit [Ping timeout: 265 seconds]
<felipec> pyra: I won't
<jhass> because reassigning a constant ruby will warn you and then it'll still behave as you expect. With a class var it likely won't behave as you expect
<jhass> can you predict the future so well? :)
<havenwood> felipec: For some background, see: https://bugs.ruby-lang.org/issues/14541
<havenwood> pyra: There are better options. You *can* do it but Matz says "the use of class variables is not recommended (like global variables)..."
<felipec> jhass: I won't reassign that constant
<jhass> but maybe somebody else will
<havenwood> felipec: Just doing use them. It's bad form. The creator of the language implores you.
<havenwood> don't use*
<pyra> havenwood: true
<felipec> In fact, the real code is to fix rubygems by providing a useful operating_system.rb: https://dpaste.com/8CVMNMPCT
<havenwood> There isn't a good reason to use them. There are several good reasons to avoid them.
<havenwood> They're effectively deprecated by shunning.
<havenwood> Use ones that exist, fine. Do not create more. That's the last thing we need.
<jhass> anyhow, you wanted to hear why the community considers using them bad practice. Take the arguments or leave them, arguing opinion is pointless
<havenwood> felipec: Use a constant.
<havenwood> felipec: Freeze it for good measure. :P
<havenwood> felipec: If you care about Gem::SYSTEM_DIR being exposed (why do you care?) use a private constant, which is for just that scenario.
feriman has quit [Ping timeout: 260 seconds]
<felipec> havenwood: I didn't ask you what you would do
<felipec> havenwood: I read that ticket, in there matz said he won't remove them for 3.0, and he doesn't want big changes because they would break backwards compatibility
<felipec> havenwood: I'm not incurring in any of the problems listed in that ticket, therefore my use of the class variable is fine
<felipec> If they didn't want people to use class variables, they would remove them
<havenwood> felipec: Why are you telling me what you asked? I can read it. "Does it make sense to set a module class with code?" Answer is "no." It makes no sense. It's bad practice.
<jhass> I don't get why you came here to ask if you're so convinced of being right
reyfi9e has joined #ruby
<havenwood> felipec: I'd not be reopening Gem in the first place so it's a complete nonstarter what I'd do.
<havenwood> felipec: Worry about you.
<havenwood> felipec: And for the love of the gods, don't use class instance variables.
<havenwood> Zoomed in to your question, a constant would be appropriate here since a class variable does not make sense.
<havenwood> felipec: Go ahead and use a global variable if you'd like, but we've answered your question.
BTRE has left #ruby ["Leaving"]
<havenwood> "If they didn't want people to use class variables, they would remove them" is not true.
<havenwood> "They" don't want people using class variables but are unwilling to break code.
<pyra> yeah, ruby is definitely very careful about backwards compatibility, it's just there as to not break things
<jhass> it's something you'll find in most projects as old as ruby
<jhass> you have to start considering what's best for your userbase in addition to what's the ideal design. That's not always aligned
gr33n7007h has joined #ruby
<felipec> havenwood: I didn't ask if it was bad practice, you still haven't told me what is wrong with my code
Technodrome has joined #ruby
cliluw has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> ok cool, I was hoping nobody was going to get baited by that
pyra has quit [Quit: Konversation terminated!]
pyra has joined #ruby
Technodrome has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
gearnode has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 258 seconds]
mangold has joined #ruby
jenrzzz has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
hiroaki has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mangold has quit [Ping timeout: 246 seconds]
felipec has quit [Quit: Leaving]
robotbee has quit [Remote host closed the connection]
robotbee has joined #ruby
cthulchu has joined #ruby
robotbee has quit [Remote host closed the connection]
robotbee has joined #ruby
niv has quit [Ping timeout: 260 seconds]
robotbee has quit [Ping timeout: 265 seconds]
niv has joined #ruby
va5c0 has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
Qchmqs has quit [Remote host closed the connection]
cek has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
sagax has quit [Ping timeout: 240 seconds]
reyfi9e has quit [Remote host closed the connection]
cuerbot has joined #ruby
reyfi9e has joined #ruby
reyfi9e has quit [Client Quit]
centrx has joined #ruby
elcuervo has quit [Ping timeout: 260 seconds]
t1054Gues has quit [Read error: Connection reset by peer]
centrx has quit [Ping timeout: 258 seconds]
centrx has joined #ruby
ruby[bot] has joined #ruby
t1054Gues has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
bkuhlmann has joined #ruby
bkuhlmann has left #ruby [#ruby]
TK__ has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 268 seconds]
johnny56 has joined #ruby
johnny56_ has quit [Ping timeout: 265 seconds]
lucasb has joined #ruby
vondruch has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
cliluw has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
work_ has joined #ruby
kluk has joined #ruby
postmodern has joined #ruby
bambanx has joined #ruby
pyra has quit [Ping timeout: 260 seconds]
work_ has quit []
robotbee has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
cliluw has joined #ruby
caronj has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
deviantfero has quit [Ping timeout: 246 seconds]
robotbee has quit [Ping timeout: 265 seconds]
TCZ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Ping timeout: 246 seconds]
bambanx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cthulchu has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
deviantfero has joined #ruby
vondruch has joined #ruby