some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ralu1 has quit [Ping timeout: 240 seconds]
some14u has joined #ruby
fef has quit [Quit: Leaving]
Ziyan has quit [Ping timeout: 256 seconds]
Ziyan has joined #ruby
e2 has quit [Remote host closed the connection]
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
Ziyan has quit [Ping timeout: 256 seconds]
Ziyan has joined #ruby
ralu1 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan_ has joined #ruby
Ziyan has quit [Ping timeout: 246 seconds]
some14u has joined #ruby
Ziyan has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ziyan_ has joined #ruby
some14u has joined #ruby
Ziyan has quit [Ping timeout: 250 seconds]
some14u has quit [Client Quit]
CrazyEddy has quit [Ping timeout: 250 seconds]
some14u has joined #ruby
Ziyan has joined #ruby
Ziyan_ has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
Ziyan has quit [Ping timeout: 256 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has joined #ruby
reset has joined #ruby
some14u has joined #ruby
AndreYuhai has quit [Ping timeout: 256 seconds]
some14u has quit [Client Quit]
some14u has joined #ruby
<adam12>
Does anyone know/remember what IRB calls to display the object return value in the REPL? I thought it might call inspect/pretty_inspect but I'm having no luck.
tsujp has quit [*.net *.split]
hololeap has quit [*.net *.split]
aeris has quit [*.net *.split]
ssh073 has quit [*.net *.split]
roadie` has quit [Ping timeout: 250 seconds]
some14u has quit [Ping timeout: 248 seconds]
<ox1eef>
adam12: pretty_print
<adam12>
ox1eef: I did try that but to no avail. I think it's an IRB issue.
<adam12>
Same issue if I return a String. It's just never called.
hololeap has joined #ruby
<ox1eef>
please try the example i pasted.
<ox1eef>
you shouldnt return a string either
<ox1eef>
you should use the object it passes
some14u has joined #ruby
<adam12>
ox1eef: Pry does use pretty_print, and using raise or your example does demonstrate it (raise just returns nothing which was fine). IRB doesn't.
<ox1eef>
that's strange, as i said that example is working fine for me both in irb and pry. maybe it is an issue with SimpleDelegator.
<adam12>
ox1eef: So suspiciously, the Delegator classes all seem to ignore certain methods, but they've been there since the turn of the century so I'm not sure if there's any discussion as to why.
<ox1eef>
i'll try your example locally, 1moment
roadie` has joined #ruby
<ox1eef>
ah i think i know how it works, you should implement it on the object you delegate to. 1sec and ill confirm.
<ox1eef>
yep, thats it adam12
<adam12>
Yeah, I was trying to avoid that. This has been a long standing issue for me, since in some ways I feel like it really limits the use of the Delegator.
<adam12>
But I see that Tempfile suffers the same fate. Tempfile.new # => #<File ...>. Not that I normally care, but technically it's a #<Tempfile ...>.
<adam12>
Anyways, I guess I'll just ditch the delegator.
<adam12>
Thanks for looking.
<ox1eef>
who knows what voodoo it is doing to do that, a option might be to use the proxy pattern instead.
<ox1eef>
no problem.
<ox1eef>
that pattern is pretty interesting, i found it in JS - pretty much lets you apply monkeypatches without touching the original object.
bit4bit has joined #ruby
<adam12>
ox1eef: Link? I'm doing something similar right now, and have in the past, but if I can't give this a great name for debugging there's going to be confusion.
<adam12>
ox1eef: ie. Client and ObservableClient. ObservableClient delegates to Client, but tracks some method calls. But if you have an variable `client`, I kind of expect inspect to show `#<ObservableClient client=other client>`.
roadie` has quit [Ping timeout: 248 seconds]
<adam12>
IRB does call pretty_print. It must be Delegate's fault.
* adam12
shakes fist
<ox1eef>
it works something like: new Proxy(obj, monkeypatches), then on dispatch of a method it first looks on the monkeypatch object, if it is not there it goes to the first object
<ox1eef>
it lets you intercept fundamental operations of any JS object. pretty cool.
AndreYuhai has quit [Ping timeout: 250 seconds]
<jongsta>
i have a capistrano script i'm running to execute commands on a remote server. the current line looks like: run %Q(sed -i "s/GRUB_DEFAULT=0/GRUB=DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-1072-aws'/" /etc/default/grub)
<jongsta>
i want to change it to something like run %Q(sed -i "s/GRUB_DEFAULT=0/GRUB=DEFAULT='Advanced options for Ubuntu>Ubuntu, with Linux $(dpkg-query --showformat='${Version}' --show 'linux-image-5.4*')-aws'/" /etc/default/grub)
<jongsta>
will that work the way i have it or are there any special considerations i need to make?
ferr_ has joined #ruby
fercell has quit [Ping timeout: 248 seconds]
Ziyan has joined #ruby
coolshaurya has quit [Quit: Reconnecting]
coolshaurya has joined #ruby
dza has quit [Quit: ]
dza has joined #ruby
dza has quit [Client Quit]
dza has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
jongsta: It looks fine from a Ruby standpoint.
oxfuxxx has joined #ruby
<jongsta>
yah, i tested it out, thanks
e2 has joined #ruby
_ht has joined #ruby
some14u has joined #ruby
some14u has quit [Ping timeout: 248 seconds]
some14u has joined #ruby
some14u has quit [Client Quit]
AndreYuhai has joined #ruby
AndreYuhai has quit [Ping timeout: 256 seconds]
some14u has joined #ruby
some14u- has joined #ruby
ralu1 has quit [Ping timeout: 276 seconds]
idiocrash has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has quit [Ping timeout: 260 seconds]
swaggboi has quit [Ping timeout: 240 seconds]
some14u- has quit [Ping timeout: 260 seconds]
swaggboi has joined #ruby
ralu1 has joined #ruby
CrazyEddy has joined #ruby
AndreYuhai has joined #ruby
oxfuxxx has quit [Ping timeout: 240 seconds]
AndreYuhai has quit [Ping timeout: 240 seconds]
sgt_chuckles has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
sgt_chuckles has quit [Quit: Client closed]
yxhuvud has quit [Remote host closed the connection]
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
SteveR has joined #ruby
hololeap has joined #ruby
SteveR has quit [Quit: Client closed]
axisys_ has quit [Remote host closed the connection]
hololeap has quit [Ping timeout: 240 seconds]
Ziyan has quit [Ping timeout: 246 seconds]
hololeap has joined #ruby
Ziyan has joined #ruby
yxhuvud has joined #ruby
dionysus69 has joined #ruby
some14u has joined #ruby
yxhuvud has quit [Remote host closed the connection]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndreYuhai has quit [Ping timeout: 272 seconds]
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX. = The Yankies M0th3Rphackers Coconut Aerospace =]
ur5us has joined #ruby
opv has joined #ruby
<opv>
hi all. i know very little of the language and need your help in getting a ruby-based piece of software to work
<opv>
the maintainer is providing "prerelease" fixes for a bug which is waiting for upstream, but when i attempt to install the gems i get version errors, namely ffi complaining it needs 6.3 but has 1.15
ur5us has quit [Remote host closed the connection]
<havenwood>
sgt_chuckles: More code would help with recommendations.
<leftylink>
don't see any reason why I should be forbidden from having a block inside another, but if that's what's being enforced, I agree with those above suggestions, which essentially just remove the `then`