<leftylink>
well, we see that Ruby's creators have the power to define $0 to be whatever they want, and it looks like from that documentation that they want it to be "the name of the script being executed"
<johnjaye>
i see
<ox1eef_>
Yup, exactly.
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
_ht has quit [Quit: _ht]
szkl has quit [Quit: Connection closed for inactivity]
phenom has quit [Quit: Everyone has a plan until they get punched in the face. -Mike Tyson-]
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #ruby
nektro has quit [Remote host closed the connection]
nektro has joined #ruby
teclator has joined #ruby
blackmetal has quit [Quit: Lost terminal]
cryptkeeper has quit [Quit: Connection closed for inactivity]
crespire1 has quit [Ping timeout: 268 seconds]
crespire1 has joined #ruby
<cxl>
Hi all, I'm having a blank... I remember there is a way in a class to write #some_method and then express that calls to #other_method would instead go to #some_method without having any definition for #other_method. But I can't remember the syntax. Does anyone know what I mean?
<ox1eef_>
alias_method ?
<cxl>
No, but it somehow helped me remember it. Module#delegate... But it's in Rails, not Ruby :(
<cxl>
so I tried `delegate [:debug, :info, ...], :log` but then I'm losing the arguments. I've also tried `def_delegator :self, :log, :info` etc. but it's a bit more verbose than I'd like (have to do it once for every method), and I'm losing the name of the original method once in #log (i.e. I don't know if it was called from :info, :debug, etc)
schne1der has joined #ruby
<ox1eef_>
cxl: How many log methods could you have ? Personally I'd go with the non-DRY version. It is simple and easy to understand.
<ox1eef_>
I would still go with what you originally had. No need to reach for metaprogramming for what's trivial.
gr33n7007h has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
gr33n7007h has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
weaksauc_ has joined #ruby
weaksauce has quit [Ping timeout: 246 seconds]
Sankalp has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
Dooky has joined #ruby
shokohsc5 has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc5 is now known as shokohsc
<dminuoso>
havenwood, still doing ruby? :-)
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
bambanxx has joined #ruby
<adam12>
cxl: I agree with ox1eef_ and would skip the metaprogramming and just make it explicit. If you're on a new enough Ruby version, you can use the `...` forwarding option to forward method args.
Fridtjof has joined #ruby
reset has quit [Quit: reset]
depesz has quit [Quit: WeeChat 3.7.1]
Jonopoly has joined #ruby
moldorcoder7 has joined #ruby
bambanxx has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
tomtmym has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
c10l has joined #ruby
barbaneigro has joined #ruby
roadie has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0]
barbaneigro has quit [Quit: ERC 5.4 (IRC client for GNU Emacs 28.2)]
shokohsc5 has joined #ruby
shokohsc has quit [Ping timeout: 246 seconds]
shokohsc5 is now known as shokohsc
rvalue has joined #ruby
blackmetal has joined #ruby
_ht has joined #ruby
shokohsc4 has joined #ruby
shokohsc has quit [Ping timeout: 268 seconds]
shokohsc4 is now known as shokohsc
TomyLobo has quit [Ping timeout: 240 seconds]
polishdub has quit [Remote host closed the connection]
grenierm has joined #ruby
otisolsen70 has quit [Ping timeout: 240 seconds]
gthank has joined #ruby
schne1der has quit [*.net *.split]
jess has quit [*.net *.split]
JSharp has quit [*.net *.split]
r0bby has quit [*.net *.split]
integral has quit [*.net *.split]
braxas has quit [*.net *.split]
Manouchehri has quit [*.net *.split]
A_Dragon has quit [*.net *.split]
petru has quit [*.net *.split]
znpy has quit [*.net *.split]
BDFOC has quit [*.net *.split]
bastelfreak has quit [*.net *.split]
JSharp_ has joined #ruby
integral_ has joined #ruby
petru has joined #ruby
bastelfreak has joined #ruby
Manouchehri__ has joined #ruby
znpy has joined #ruby
braxas_ has joined #ruby
r0bby_ has joined #ruby
schne1der has joined #ruby
A_Dragon has joined #ruby
jess has joined #ruby
bastelfreak has quit [Client Quit]
integral_ is now known as integral
bastelfreak has joined #ruby
pounce has quit [Ping timeout: 240 seconds]
pounce has joined #ruby
BDFOC has joined #ruby
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
schne1der has quit [Client Quit]
reset has joined #ruby
polishdub has joined #ruby
<isene>
How do I determine a user's shell?
<Shell>
the path to the shell's executable is in the SHELL environment variable, so you can guess which shell it is based on its name if you like.
<isene>
Is there any Ruby command to determine it?
TomyLobo has joined #ruby
___nick___ has joined #ruby
yassernasc has joined #ruby
gthank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanxx has joined #ruby
ua_ has joined #ruby
ua__ has quit [Ping timeout: 248 seconds]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
<adam12>
isene: The current user or another user?
<llua>
the random highlights you get must be annoying