<ruby[bot]>
tolarz: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<tolarz>
No, it's real code
<tolarz>
but I autogenerate it from Python
<havenwood>
tolarz: Yeah, it's a Symbol, not a function.
<morantron>
tolarz: you might need to remove that ':' from the beginning
seaef has joined #ruby
<havenwood>
tolarz: Is there a #pop method available in this context?
<morantron>
havenwood: any tips on how to avoid requiring rubygems but still use it for distribution?
<tolarz>
wonderful, now it's valid syntax
<tolarz>
but it doesn't find pop upon runtime
cnsvc_ has joined #ruby
<havenwood>
tolarz: It seems there's no #pop method available on the receiver.
<havenwood>
tolarz: You can check `defined? pop` to see if there's a method or local varialble.
<tolarz>
my class inherits from RegexLexer and pop is a method there
<havenwood>
tolarz: With an exclamation mark?
<havenwood>
tolarz: #pop!
<tolarz>
why the hash?
<havenwood>
tolarz: That's how we reference an instance method.
<havenwood>
tolarz: If so, check the receiver of the method. What's `self` where you're calling the #pop! method?
<havenwood>
tolarz: You can `p self` or if you want to debug, put a `binding.irb` in the code to jump into the irb REPL at that spot.
<havenwood>
morantron: Your executable shebang should determine how Ruby is used.
<morantron>
thanks havenwood
<havenwood>
morantron: You might have portability issues using a flag in the shebang though.
<havenwood>
morantron: I haven't tried it for --disable=gems
<morantron>
yeah! i saw that hahaha
<morantron>
worked on my machine, but as soon as i tried on a VM with an older ubuntu version it crashed
<havenwood>
morantron: I'd expect it to work on macOS, but `#!/usr/bin/env ruby --disable="gems"` might not work on Linux.
<morantron>
yep, i'll need to take portability into account
<havenwood>
I'd expect it to not work on Linux, to be more precise.
cnsvc_ has quit [Ping timeout: 240 seconds]
<tolarz>
havenwood: got it sorted, thank you!
<havenwood>
morantron: You could alternatively instruct your users how to pass the flag.
<havenwood>
tolarz: any time!
<havenwood>
morantron: I'm not immediately thinking of a way to add the flag without shebang support.
<morantron>
my CLI is kinda weird, since it calls itself
<morantron>
it's a tmux plugin, and the first time it runs when tmux.conf it's sourced ( i'm not concerned about startup time here )
<morantron>
so i can just include the flag when the CLI calls itself
<havenwood>
morantron: Do you need to shell out when it calls itself? Can you stay inside a single process? (I'm not clear on what you're doing.)
<morantron>
it's hard to explain
alexherbo21 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo21 is now known as alexherbo2
rippa has joined #ruby
fmcs has left #ruby [#ruby]
imode has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kristian_on_linu has joined #ruby
orbyt_ has joined #ruby
xco has joined #ruby
schne1der has joined #ruby
seaef has quit [Quit: ZZZzzz…]
seaef has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mheld has joined #ruby
NODE has quit []
Benett has quit [Remote host closed the connection]
Benett has joined #ruby
cnsvc_ has joined #ruby
Manis has joined #ruby
cnsvc_ has quit [Ping timeout: 240 seconds]
<Manis>
Hi. I have a deployment script that checks out a Git repository and runs "bundle install --deployment". Unfortunately the bundle install takes quite a bit of time to compile all the C dependencies. Is there a way to cache the compiled binaries?
<tolarz>
havenwood: heya, I can now convert a subset of Python code to Ruby!
chalkmonster has quit [Quit: WeeChat 2.8]
<tolarz>
and it works perfectly, thanks again
NODE has joined #ruby
wogi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wogi has joined #ruby
xco has joined #ruby
duderonomy has joined #ruby
conta has quit [Quit: conta]
tolarz has left #ruby ["WeeChat 2.3"]
tau has joined #ruby
tau has quit [Remote host closed the connection]
xco has quit [Read error: Connection reset by peer]
wogi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Manis has quit [Quit: WeeChat 2.3]
wogi has joined #ruby
Xiti has quit [Quit: Leaving]
ldepandis has joined #ruby
Xiti has joined #ruby
wogi has quit [Ping timeout: 272 seconds]
schne1der has quit [Ping timeout: 265 seconds]
wymillerlinux has quit [Read error: Connection reset by peer]
wymillerlinux has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
cd has joined #ruby
wogi has joined #ruby
TCZ has joined #ruby
kinduff has quit [Read error: Connection reset by peer]