jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
<havenwood> libsys: It is a bad practice, generally. If more than one gem does it, it can collide.
<havenwood> libsys: There's more of a performance impact with refinements, which are lexically scoped and usually a better option than monkeypatching core classes.
<leftylink> all I know is that in projects where I'm in charge, I will never modify base classes. refinements only.
<havenwood> Alternatively, you can use DelegateClass.
<adam12> I've allowed it in the past on projects maybe 1 or 2 times, but I'd almost always rather something else.
<adam12> I won't use refinements because their access from irb is confusing, and this confuses most team members I might work with.
<adam12> I'd almost just rather a module with module_function use. StringUtil.camel_case(str)
<libsys> actually a module was the way I thought first... didn't know about refinements
crankharder has joined #ruby
<libsys> is there any advantage of refinements over a module other than syntax?
<adam12> libsys: Restriction of scope. Refinements are lexically scoped to the file they are called in.
g0zart has joined #ruby
<havenwood> adam12: It's sad that `IRB.conf[:CONTEXT_MODE] = 0` is all it takes for refinements to work in IRB yet somehow it isn't the default.
<havenwood> Probably worth changing the default to a proc, so refinements work.
<havenwood> I do it in my .irbrc.
crankharder has quit [Ping timeout: 252 seconds]
aeris has quit [Ping timeout: 258 seconds]
aeris has joined #ruby
<adam12> havenwood: indeed.
<adam12> I wonder what that even does.
<adam12> I find irb overly creative in many places. Atypical of the time it was written, I guess.
libsys has quit [Ping timeout: 244 seconds]
libsys has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
markong has quit [Ping timeout: 252 seconds]
giorgian has joined #ruby
giorgian has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
g0zart has quit [Quit: Leaving]
Bi[m] has quit [Ping timeout: 268 seconds]
jollyrogue[m] has quit [Ping timeout: 268 seconds]
kaivai_ has quit [Quit: ZNC - https://znc.in]
scottg489 has quit [Remote host closed the connection]
scottg489 has joined #ruby
kaivai has joined #ruby
Vonter has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
<havenwood> adam12: CONTEXT_MODE 4 is default, a copy of TOPLEVEL_BINDING https://github.com/ruby/irb/blob/v1.4.1/lib/irb/workspace.rb#L28-L64
<havenwood> CONTEXT_MODE 0 is `eval("proc{binding}.call", TOPLEVEL_BINDING, ...)` which works with refinements for whatever reason.
<havenwood> The overhead seems slight enough I gladly take it to have refinements work.
kaivai has quit [Quit: ZNC - https://znc.in]
kaivai has joined #ruby
nirvdrum has joined #ruby
giorgian has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
giorgian has quit [Ping timeout: 268 seconds]
nirvdrum has joined #ruby
John_Ivan has quit [Ping timeout: 268 seconds]
venom has quit [Quit: Connection closed for inactivity]
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
fercell has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
crankharder has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- is now known as Sankalp
Vonter has joined #ruby
m-antis has quit [Ping timeout: 268 seconds]
Linux_Kerio has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
nirvdrum has quit [Quit: nirvdrum]
eddof13 has joined #ruby
giorgian has joined #ruby
giorgian has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 244 seconds]
siomn has quit [Remote host closed the connection]
siomn has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rvalue has joined #ruby
Linux_Kerio has quit [Ping timeout: 248 seconds]
fercell has joined #ruby
Vonter has quit [Ping timeout: 268 seconds]
fercell has quit [Ping timeout: 248 seconds]
jollyrogue[m] has joined #ruby
balo_ has joined #ruby
balo has quit [Quit: leaving]
Vonter has joined #ruby
Rounin has joined #ruby
giorgian has joined #ruby
giorgian has quit [Ping timeout: 248 seconds]
balo_ has quit [Quit: leaving]
balo has joined #ruby
fercell has joined #ruby
Rounin has quit [Ping timeout: 244 seconds]
fercell has quit [Ping timeout: 268 seconds]
sagax has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
kale has joined #ruby
giorgian has joined #ruby
fercell has joined #ruby
protektwar has quit [Ping timeout: 248 seconds]
fercell has quit [Ping timeout: 268 seconds]
fercell has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
jpn has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
giorgian has quit [Ping timeout: 268 seconds]
siomn has quit [Remote host closed the connection]
siomn has joined #ruby
artemis has joined #ruby
fercell has joined #ruby
fercell has quit [Ping timeout: 248 seconds]
giorgian has joined #ruby
John_Ivan has joined #ruby
artemis has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
Bi[m] has joined #ruby
artemis has joined #ruby
markong has joined #ruby
fercell has joined #ruby
moldorcoder7 has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
<leah2> regexp timeout isnice
moldorcoder7 has quit [Ping timeout: 248 seconds]
moldorcoder7_ has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
Sankalp has quit [Ping timeout: 268 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
eddof13 has joined #ruby
Sankalp has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
Sankalp has quit [Ping timeout: 244 seconds]
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Successus has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
jhass has quit [Quit: Bye]
crankharder has joined #ruby
Sankalp has joined #ruby
protektwar has quit [Ping timeout: 248 seconds]
jhass has joined #ruby
jpn has joined #ruby
crankharder has quit [Quit: leaving]
jpn has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
jpn has joined #ruby
artemis has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
Linux_Kerio has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp- is now known as Sankalp
hightower4 has quit [Ping timeout: 244 seconds]
eddof13 has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- is now known as Sankalp
Rounin has joined #ruby
Sankalp has quit [Ping timeout: 244 seconds]
Sankalp has joined #ruby
nirvdrum has joined #ruby
kale has quit [Ping timeout: 268 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sankalp has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
eddof13 has joined #ruby
szkl has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
Linux_Kerio has quit [Ping timeout: 248 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
artemis has joined #ruby
artemis has quit [Ping timeout: 248 seconds]
artemis has joined #ruby
dionysus69 has joined #ruby
eddof13 has joined #ruby
oxfuxxx has quit [Ping timeout: 244 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
Linux_Kerio has joined #ruby
axisys has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
artemis has quit [Ping timeout: 252 seconds]
CrazyEddy has quit [Ping timeout: 244 seconds]
fercell has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
protektwar has quit [Ping timeout: 248 seconds]
Rounin has quit [Ping timeout: 244 seconds]
giorgian has quit [Ping timeout: 248 seconds]
sagax has joined #ruby
Thanzex has joined #ruby
desnudopenguino has quit [Ping timeout: 255 seconds]
Rounin has joined #ruby
protektwar has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
desnudopenguino has joined #ruby
siomn has quit [Remote host closed the connection]
siomn has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
TomyWork has quit [Quit: Leaving]
jpn has joined #ruby
eddof13 has joined #ruby
markong has quit [Ping timeout: 268 seconds]
dionysus69 has quit [Quit: dionysus69]
protektwar has quit [Ping timeout: 260 seconds]
ua__ has quit [Ping timeout: 244 seconds]
ua_ has joined #ruby
yxhuvud has quit [Remote host closed the connection]
giorgian has joined #ruby
yxhuvud has joined #ruby
_ht has joined #ruby
giorgian has quit [Ping timeout: 252 seconds]
Linux_Kerio has quit [Ping timeout: 252 seconds]
oxfuxxx has joined #ruby
justache is now known as justJingo
jpn has quit [Ping timeout: 252 seconds]
cocalero has joined #ruby
ur5us has joined #ruby
oxfuxxx has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ur5us has quit [Ping timeout: 248 seconds]
petgoat has joined #ruby
_ht has quit [Remote host closed the connection]
nirvdrum has joined #ruby
giorgian has joined #ruby
oxfuxxx has joined #ruby
Vonter has quit [Ping timeout: 248 seconds]
giorgian has quit [Ping timeout: 268 seconds]
giorgian has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jpn has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
jpn has quit [Ping timeout: 252 seconds]
finsternis has quit [Read error: Connection reset by peer]
oxfuxxx has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
oxfuxxx has joined #ruby
finsternis has joined #ruby
Successus has quit []
giorgian has quit [Ping timeout: 252 seconds]
foxxx0 has quit [Quit: foxxx0]
foxxx0 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
siomn has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
siomn has joined #ruby
fercell has quit [Ping timeout: 244 seconds]
polishdub has quit [Quit: leaving]
Rounin has quit [Ping timeout: 248 seconds]
markong has joined #ruby
fercell has joined #ruby
m-antis has joined #ruby
fercell has quit [Ping timeout: 248 seconds]