00:01
<
havenwood >
libsys: It is a bad practice, generally. If more than one gem does it, it can collide.
00:02
<
havenwood >
libsys: There's more of a performance impact with refinements, which are lexically scoped and usually a better option than monkeypatching core classes.
00:02
<
leftylink >
all I know is that in projects where I'm in charge, I will never modify base classes. refinements only.
00:02
<
havenwood >
Alternatively, you can use DelegateClass.
00:06
<
adam12 >
I've allowed it in the past on projects maybe 1 or 2 times, but I'd almost always rather something else.
00:06
<
adam12 >
I won't use refinements because their access from irb is confusing, and this confuses most team members I might work with.
00:07
<
adam12 >
I'd almost just rather a module with module_function use. StringUtil.camel_case(str)
00:19
<
libsys >
actually a module was the way I thought first... didn't know about refinements
00:23
crankharder has joined #ruby
00:26
<
libsys >
is there any advantage of refinements over a module other than syntax?
00:27
<
adam12 >
libsys: Restriction of scope. Refinements are lexically scoped to the file they are called in.
00:28
g0zart has joined #ruby
00:28
<
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.
00:28
<
havenwood >
Probably worth changing the default to a proc, so refinements work.
00:29
<
havenwood >
I do it in my .irbrc.
00:29
crankharder has quit [Ping timeout: 252 seconds]
00:32
aeris has quit [Ping timeout: 258 seconds]
00:33
aeris has joined #ruby
00:34
<
adam12 >
havenwood: indeed.
00:34
<
adam12 >
I wonder what that even does.
00:34
<
adam12 >
I find irb overly creative in many places. Atypical of the time it was written, I guess.
00:37
libsys has quit [Ping timeout: 244 seconds]
00:38
libsys has joined #ruby
00:41
aeris has quit [Remote host closed the connection]
00:41
aeris has joined #ruby
01:00
markong has quit [Ping timeout: 252 seconds]
01:05
giorgian has joined #ruby
01:11
giorgian has quit [Ping timeout: 260 seconds]
01:21
eddof13 has joined #ruby
01:26
g0zart has quit [Quit: Leaving]
01:35
Bi[m] has quit [Ping timeout: 268 seconds]
01:35
jollyrogue[m] has quit [Ping timeout: 268 seconds]
01:51
scottg489 has quit [Remote host closed the connection]
01:51
scottg489 has joined #ruby
01:54
kaivai has joined #ruby
01:55
Vonter has quit [Ping timeout: 260 seconds]
01:56
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:02
eddof13 has joined #ruby
02:04
eddof13 has quit [Client Quit]
02:05
<
havenwood >
CONTEXT_MODE 0 is `eval("proc{binding}.call", TOPLEVEL_BINDING, ...)` which works with refinements for whatever reason.
02:06
<
havenwood >
The overhead seems slight enough I gladly take it to have refinements work.
02:18
kaivai has joined #ruby
02:21
nirvdrum has joined #ruby
03:06
giorgian has joined #ruby
03:07
nirvdrum has quit [Quit: nirvdrum]
03:11
giorgian has quit [Ping timeout: 268 seconds]
03:14
nirvdrum has joined #ruby
03:18
John_Ivan has quit [Ping timeout: 268 seconds]
03:21
venom has quit [Quit: Connection closed for inactivity]
03:21
nirvdrum has quit [Quit: nirvdrum]
03:22
nirvdrum has joined #ruby
03:27
fercell has joined #ruby
03:32
fercell has quit [Ping timeout: 268 seconds]
03:38
crankharder has joined #ruby
03:44
Sankalp- has joined #ruby
03:44
Sankalp has quit [Ping timeout: 260 seconds]
03:44
Sankalp- is now known as Sankalp
03:50
Vonter has joined #ruby
03:53
m-antis has quit [Ping timeout: 268 seconds]
04:11
Linux_Kerio has joined #ruby
04:32
crankharder has quit [Ping timeout: 252 seconds]
04:39
fercell has joined #ruby
04:44
fercell has quit [Ping timeout: 268 seconds]
04:48
nirvdrum has quit [Quit: nirvdrum]
04:53
eddof13 has joined #ruby
05:07
giorgian has joined #ruby
05:12
giorgian has quit [Ping timeout: 252 seconds]
05:21
ur5us has quit [Ping timeout: 244 seconds]
05:37
siomn has quit [Remote host closed the connection]
05:38
siomn has joined #ruby
06:02
protektwar has joined #ruby
06:02
protektwar has quit [Changing host]
06:02
protektwar has joined #ruby
06:04
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:24
rvalue has joined #ruby
06:35
Linux_Kerio has quit [Ping timeout: 248 seconds]
06:36
fercell has joined #ruby
06:37
Vonter has quit [Ping timeout: 268 seconds]
06:41
fercell has quit [Ping timeout: 248 seconds]
06:44
jollyrogue[m] has joined #ruby
06:47
balo_ has joined #ruby
06:47
balo has quit [Quit: leaving]
06:49
Vonter has joined #ruby
06:56
Rounin has joined #ruby
07:08
giorgian has joined #ruby
07:13
giorgian has quit [Ping timeout: 248 seconds]
07:21
balo_ has quit [Quit: leaving]
07:21
balo has joined #ruby
07:31
fercell has joined #ruby
07:33
Rounin has quit [Ping timeout: 244 seconds]
07:36
fercell has quit [Ping timeout: 268 seconds]
07:36
sagax has quit [Ping timeout: 240 seconds]
07:45
jpn has joined #ruby
07:55
kale has joined #ruby
08:07
giorgian has joined #ruby
08:15
fercell has joined #ruby
08:18
protektwar has quit [Ping timeout: 248 seconds]
08:20
fercell has quit [Ping timeout: 268 seconds]
08:37
fercell has joined #ruby
08:42
fercell has quit [Ping timeout: 252 seconds]
08:56
jpn has quit [Ping timeout: 248 seconds]
09:16
jpn has joined #ruby
09:24
giorgian has quit [Ping timeout: 268 seconds]
09:25
siomn has quit [Remote host closed the connection]
09:25
siomn has joined #ruby
09:43
artemis has joined #ruby
09:47
fercell has joined #ruby
09:52
fercell has quit [Ping timeout: 248 seconds]
09:57
giorgian has joined #ruby
09:58
John_Ivan has joined #ruby
10:02
artemis has quit [Ping timeout: 260 seconds]
10:02
TomyWork has joined #ruby
10:05
Bi[m] has joined #ruby
10:11
artemis has joined #ruby
10:25
markong has joined #ruby
10:25
fercell has joined #ruby
10:28
moldorcoder7 has joined #ruby
10:30
fercell has quit [Ping timeout: 252 seconds]
10:33
<
leah2 >
regexp timeout isnice
10:34
moldorcoder7 has quit [Ping timeout: 248 seconds]
10:34
moldorcoder7_ has joined #ruby
10:52
szkl has quit [Quit: Connection closed for inactivity]
10:52
Sankalp has quit [Ping timeout: 268 seconds]
10:54
protektwar has joined #ruby
10:54
protektwar has quit [Changing host]
10:54
protektwar has joined #ruby
10:56
eddof13 has joined #ruby
10:56
Sankalp has joined #ruby
11:07
crankharder has joined #ruby
11:11
crankharder has quit [Ping timeout: 244 seconds]
11:30
Sankalp has quit [Ping timeout: 244 seconds]
11:33
Sankalp has joined #ruby
11:43
Sankalp has quit [Ping timeout: 268 seconds]
12:11
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:23
Successus has joined #ruby
12:25
jpn has quit [Ping timeout: 248 seconds]
12:29
jhass has quit [Quit: Bye]
12:29
crankharder has joined #ruby
12:30
Sankalp has joined #ruby
12:35
protektwar has quit [Ping timeout: 248 seconds]
12:40
jhass has joined #ruby
12:51
jpn has joined #ruby
12:55
crankharder has quit [Quit: leaving]
12:57
jpn has quit [Ping timeout: 248 seconds]
13:07
dionysus69 has joined #ruby
13:09
jpn has joined #ruby
13:33
Linux_Kerio has joined #ruby
13:38
Sankalp- has joined #ruby
13:38
Sankalp has quit [Ping timeout: 260 seconds]
13:38
Sankalp- is now known as Sankalp
13:48
hightower4 has quit [Ping timeout: 244 seconds]
13:51
eddof13 has joined #ruby
13:56
Sankalp- has joined #ruby
13:57
Sankalp has quit [Ping timeout: 268 seconds]
13:57
Sankalp- is now known as Sankalp
14:02
Rounin has joined #ruby
14:08
Sankalp has quit [Ping timeout: 244 seconds]
14:10
Sankalp has joined #ruby
14:17
nirvdrum has joined #ruby
14:28
kale has quit [Ping timeout: 268 seconds]
14:33
Sankalp has quit [Ping timeout: 260 seconds]
14:36
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:37
Sankalp has joined #ruby
14:39
nirvdrum has quit [Quit: nirvdrum]
14:39
eddof13 has joined #ruby
14:41
szkl has joined #ruby
14:45
dionysus69 has quit [Ping timeout: 268 seconds]
15:01
Linux_Kerio has quit [Ping timeout: 248 seconds]
15:10
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:28
artemis has joined #ruby
15:33
artemis has quit [Ping timeout: 248 seconds]
15:42
artemis has joined #ruby
15:42
dionysus69 has joined #ruby
15:43
eddof13 has joined #ruby
15:43
oxfuxxx has quit [Ping timeout: 244 seconds]
15:45
Aminda has quit [Remote host closed the connection]
15:46
Aminda has joined #ruby
15:46
Linux_Kerio has joined #ruby
15:52
axisys has joined #ruby
16:02
protektwar has joined #ruby
16:02
protektwar has quit [Changing host]
16:02
protektwar has joined #ruby
16:06
artemis has quit [Ping timeout: 252 seconds]
16:11
CrazyEddy has quit [Ping timeout: 244 seconds]
16:13
fercell has joined #ruby
16:18
fercell has quit [Ping timeout: 252 seconds]
16:18
protektwar has quit [Ping timeout: 248 seconds]
16:20
Rounin has quit [Ping timeout: 244 seconds]
16:36
giorgian has quit [Ping timeout: 248 seconds]
16:39
sagax has joined #ruby
16:51
Thanzex has joined #ruby
16:52
desnudopenguino has quit [Ping timeout: 255 seconds]
16:52
Rounin has joined #ruby
16:56
protektwar has joined #ruby
17:03
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:10
jpn has quit [Ping timeout: 260 seconds]
17:27
jpn has joined #ruby
17:31
desnudopenguino has joined #ruby
17:37
siomn has quit [Remote host closed the connection]
17:38
siomn has joined #ruby
17:40
jpn has quit [Ping timeout: 252 seconds]
17:49
TomyWork has quit [Quit: Leaving]
17:58
jpn has joined #ruby
18:03
eddof13 has joined #ruby
18:04
markong has quit [Ping timeout: 268 seconds]
18:10
dionysus69 has quit [Quit: dionysus69]
18:18
protektwar has quit [Ping timeout: 260 seconds]
18:23
ua__ has quit [Ping timeout: 244 seconds]
18:25
ua_ has joined #ruby
18:30
yxhuvud has quit [Remote host closed the connection]
18:32
giorgian has joined #ruby
18:33
yxhuvud has joined #ruby
18:36
_ht has joined #ruby
18:37
giorgian has quit [Ping timeout: 252 seconds]
18:45
Linux_Kerio has quit [Ping timeout: 252 seconds]
19:14
oxfuxxx has joined #ruby
19:27
justache is now known as justJingo
19:33
jpn has quit [Ping timeout: 252 seconds]
19:37
cocalero has joined #ruby
19:41
ur5us has joined #ruby
20:02
ur5us has quit [Ping timeout: 248 seconds]
20:11
petgoat has joined #ruby
20:15
_ht has quit [Remote host closed the connection]
20:26
nirvdrum has joined #ruby
20:29
giorgian has joined #ruby
20:32
oxfuxxx has joined #ruby
20:34
Vonter has quit [Ping timeout: 248 seconds]
20:36
giorgian has quit [Ping timeout: 268 seconds]
20:42
giorgian has joined #ruby
20:49
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:51
jpn has joined #ruby
20:52
nirvdrum has quit [Quit: nirvdrum]
20:56
jpn has quit [Ping timeout: 252 seconds]
20:59
finsternis has quit [Read error: Connection reset by peer]
21:10
oxfuxxx has quit [Ping timeout: 268 seconds]
21:14
ur5us has joined #ruby
21:23
oxfuxxx has joined #ruby
21:47
finsternis has joined #ruby
21:59
Successus has quit []
22:19
giorgian has quit [Ping timeout: 252 seconds]
22:19
foxxx0 has quit [Quit: foxxx0]
22:21
foxxx0 has joined #ruby
22:25
ur5us has quit [Remote host closed the connection]
22:25
ur5us has joined #ruby
22:39
siomn has quit [Ping timeout: 252 seconds]
22:51
fercell has joined #ruby
22:52
siomn has joined #ruby
22:55
fercell has quit [Ping timeout: 244 seconds]
23:02
polishdub has quit [Quit: leaving]
23:22
Rounin has quit [Ping timeout: 248 seconds]
23:33
markong has joined #ruby
23:35
fercell has joined #ruby
23:39
m-antis has joined #ruby
23:40
fercell has quit [Ping timeout: 248 seconds]