<naftilos76>
using a mutex that encloses the three lines of code that call 'add' method fixes the issue. Why doesn't the mutex inside the class do that?
<leftylink>
queue is shared. consider scenario: obj1 does @queue << "started!" at line 34. then, obj3 runs and logs "obj3 started!"
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
akem has joined #ruby
meinside has joined #ruby
schaerli has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<naftilos76>
leftylink: placing "@queue << str" in the mutex seems to be working
<leftylink>
at which point the queue is senseless, since it will now only ever contain one element
jenrzzz has joined #ruby
<naftilos76>
yep, overlooked that part - thanks!
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
klaas_ has joined #ruby
klaas has quit [Read error: Connection reset by peer]
probonic08 has quit [Write error: Connection reset by peer]
SoF has quit [Write error: Connection reset by peer]
probonic08 has joined #ruby
thebetra- has quit [Ping timeout: 256 seconds]
pinkpandabot has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 256 seconds]
thebetrayer has joined #ruby
SoF has joined #ruby
evdubs has quit [Quit: Leaving]
havenwood has joined #ruby
havenwood has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
evdubs has joined #ruby
dfucci has joined #ruby
m27frogy has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
weaksauce has quit [Ping timeout: 246 seconds]
maryo has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
maryo has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
thunderbirdtr_ has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
thunderbirdtr_ has quit [Client Quit]
thunderbirdtr_ has joined #ruby
thunderbirdtr_ has quit [Remote host closed the connection]
thunderbirdtr_ has joined #ruby
thunderbirdtr_ has quit [Client Quit]
thunderbirdtr has joined #ruby
thunderbirdtr has quit [Client Quit]
thunderbirdtr has joined #ruby
thunderbirdtr has quit [Client Quit]
maryo has quit [Ping timeout: 256 seconds]
prestorium has joined #ruby
Rudd0 has quit [Ping timeout: 240 seconds]
schaerli has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
_aeris has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris is now known as _aeris_
prestorium has quit [Ping timeout: 264 seconds]
cd has joined #ruby
ua_ has joined #ruby
ua has quit [Ping timeout: 265 seconds]
WaqarVky has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
WaqarVky has left #ruby [#ruby]
maryo has joined #ruby
oneeggeach has joined #ruby
oneeggeach has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
lmat has joined #ruby
venmx has joined #ruby
jess has joined #ruby
jl4 has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 246 seconds]
prestorium has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
prion_ has joined #ruby
lucasb has joined #ruby
dfucci has joined #ruby
jenrzzz has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
totoro2021 has quit [Read error: Connection reset by peer]
totoro2021 has joined #ruby
<nakilon>
funny thing: somehow minitest sources are set chmod 400 before bundling as a gem
<nakilon>
so you can't quickly patch it and is forced either to chmod or create a separate directory
akem has quit [Remote host closed the connection]
<nakilon>
how am I supposed to instantiate an exception that would have a #cause that I pass to it?
<nakilon>
but no, wait, I don't need to raise it, I only need to build it
GodFather has joined #ruby
<nakilon>
I could raise it and then immediately edit the backtrace but that does not sound clean
GodFather has quit [Max SendQ exceeded]
GodFather has joined #ruby
akem has joined #ruby
AnomalyXII has quit [Ping timeout: 240 seconds]
<nakilon>
nvm
jenrzzz has joined #ruby
<nakilon>
I mean, doing the "begin raise UnexpectedError.new(e) rescue => ee self.failures << ee end" indeed restored the cause and minitest even prints it but its backtrace looks weird
<nakilon>
hmmm, it prints the .cause but the real exception is somehow inside the .cause.cause
Rudd0 has joined #ruby
<nakilon>
oh, of course, because I did this hack... and minitest does not go two levels into it (
<nakilon>
or maybe " from ..." isn't attached by minitest but rather by ruby because I don't see anything about cause in minitest source code
jenrzzz has quit [Ping timeout: 246 seconds]
pwnd_sfw4 has joined #ruby
kristian_on_linu has joined #ruby
pwnd_sfw has quit [Ping timeout: 260 seconds]
pwnd_sfw4 is now known as pwnd_sfw
venmx has joined #ruby
goepsilongo has joined #ruby
goepsilongo has quit [Remote host closed the connection]
venmx has quit [Ping timeout: 246 seconds]
goepsilongo has joined #ruby
ChmEarl has joined #ruby
cnsvc has joined #ruby
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
dfucci has joined #ruby
jl4 has quit [Ping timeout: 264 seconds]
maryo has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 246 seconds]
jl4 has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Client Quit]
jenrzzz has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
dfucci has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
jl4 has joined #ruby
Rudd0^ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jl4 has quit [Ping timeout: 264 seconds]
cahoots_ has joined #ruby
<cahoots_>
hi, why does this output an empty string? impl = ERB.new("<% 'hi' %>").result
<cahoots_>
ha nm
jenrzzz has quit [Ping timeout: 260 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
jl4 has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
venmx has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
AndreYuhai has joined #ruby
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
<AndreYuhai>
Hey there, I am inheriting from Mechanize to create a client for a specific website and I also want to add new methods to Mechanize::Page. However when I add methods to Mechanize::Page then this patches the actual Mechanize gem as well. How can I do that only for the Page of the class that inherits from Mechanize?
<jidar>
Sellow: is how I take care of it anyway, but obviously doesn't account for ruby version
<jidar>
or a bundler config for ${PROJECT}/vendor
<Sellow>
Ah thank you!
ua_ has quit [Ping timeout: 256 seconds]
<yxhuvud>
I use a .ruby-version file in each repo which has the info, and then my chruby installation automagically switch to the correct version of stuff.
<Sellow>
I ended up just using rbenv without gemsets
<Sellow>
First ever time using ruby, quite a lot to learn
ua_ has joined #ruby
leah2 has quit [Ping timeout: 272 seconds]
venmx has joined #ruby
leah2 has joined #ruby
jenrzzz has joined #ruby
ur5us_ has joined #ruby
jl4 has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
hiroaki_ has quit [Ping timeout: 272 seconds]
naftilos76 has quit [Quit: Leaving]
viporli has quit [Remote host closed the connection]
greypack has quit [Quit: All your IRC are belong to ZNC]
greypack has joined #ruby
mcr has quit [Ping timeout: 265 seconds]
mcr has joined #ruby
prestorium has quit [Ping timeout: 272 seconds]
jl4 has quit [Ping timeout: 246 seconds]
coniptor has quit [Ping timeout: 246 seconds]
pwnd_sfw has joined #ruby
prion_ has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
jenrzzz has joined #ruby
jl4 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
dan64- has joined #ruby
Rudd0 has joined #ruby
dan64 has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
viporli has quit [Remote host closed the connection]
akem has joined #ruby
jenrzzz has joined #ruby
jl4 has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
xf3rno has joined #ruby
cnsvc has quit [Remote host closed the connection]
venmx has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
coniptor has quit [Ping timeout: 246 seconds]
ur5us_ has joined #ruby
venmx has joined #ruby
jenrzzz has joined #ruby
coniptor has joined #ruby
dviola has quit [Quit: WeeChat 3.0]
dviola has joined #ruby
oneeggeach has joined #ruby
Azure has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
Azure has joined #ruby
jenrzzz has joined #ruby
oneeggeach has quit [Quit: Leaving...]
jenrzzz has quit [Ping timeout: 256 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Guest91715 has quit [Quit: Leaving]
dhollinger has quit [Ping timeout: 246 seconds]
AndreYuhai has joined #ruby
<AndreYuhai>
When some Sidekiq::Worker has been called with perform_async then everytime a new object is getting instantiated, right?
dhollinger has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<adam12>
AndreYuhai: Yes.
jenrzzz has quit [Ping timeout: 246 seconds]
<AndreYuhai>
adam12, Is there any way to use the same class for each thread instead? For example if my worker is instantiating another class in "initialize" then with every "perform_async" it's instantiated again and again. Is there any way to persist that object instantiated in "initialize" instead?
<AndreYuhai>
I meant same instantiated worker* not the class
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
venmx has quit [Ping timeout: 256 seconds]
xf3rno has quit [Quit: WeeChat 3.0]
jenrzzz has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
<weaksauce>
how would one read from stdin and wait until it has more input?
<weaksauce>
but you have to wait until it has 4 bytes and then wait until it has some variable amount of data available