havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
cosmic has quit [Client Quit]
huyderman has quit [Read error: Connection reset by peer]
cosmicz has joined #ruby
halt has joined #ruby
axsuul has joined #ruby
KeyJoo has quit [Ping timeout: 240 seconds]
MrBusiness has joined #ruby
<cosmicz> Is there a better way to do Dir.mkdir(File.join(ENV['HOME'], 'tmp')) unless File.exists?(File.join(ENV['HOME'], 'tmp')
<cosmicz> So I don't repeat myself?
<Zarthus> make it a variable?
<cosmicz> Can I keep it one line?
<Zarthus> note that not many people will like it if you make a directory in their home
<Zarthus> /tmp kind of exists, as well
<cosmicz> Was trying to play with { |dir| Dir.mkdir(dir) unless File.exists?(dir) } but how do I call the block with a parameter?
<Papierkorb> There's also `require "tempfile"`
dviola has quit [Ping timeout: 260 seconds]
<Zarthus> you could FileUtils.mkdir(_p) which don't error if the dir already exists I think
<Zarthus> i think it's specifically mkdir_p that doesn't error
<cosmicz> oh, looking into it, Zarthus, thanks
dviola has joined #ruby
<Zarthus> note that it's equivelent to calling mkdir -p
<cosmicz> Note that this app is only for my use, so there's no-one that I'll annoy by making directories in their homedirectory for
jenrzzz has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
gnufied has quit [Quit: Leaving]
mson has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
nopolitica has quit [Ping timeout: 248 seconds]
gusrub has quit [Remote host closed the connection]
r7c has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has joined #ruby
zachk has quit [Quit: Leaving]
vondruch has quit [Quit: vondruch]
bruce_lee has quit [Ping timeout: 248 seconds]
cconstantine has joined #ruby
vondruch has joined #ruby
bruce_lee has joined #ruby
brent__ has quit [Remote host closed the connection]
halt has quit [Quit: ZNC 1.6.5 - http://znc.in]
halt has joined #ruby
r7c has quit [Quit: Leaving]
marr has quit [Ping timeout: 240 seconds]
bruno-__ has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
cdg has joined #ruby
bruno-___ has quit [Ping timeout: 248 seconds]
vondruch has joined #ruby
<cconstantine> I’m trying to make a native extension in a gem, and I’m hitting a really weird issue in macosx. If you require the .bundle (aka, shared object file) I get a “LoadError: incompatible library version”. If i cd to the gem directory holding that .bundle and require from there it works, but only if I change to the directory in bash before loading up ruby; if I Dir.chdir then try to require it doesn’t work. Sample output:
<cconstantine> https://pastebin.com/LUVBK6Fz Help?
<ruby[bot]> cconstantine: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/74b982b879b92e83f273de4726f8954a
<ruby[bot]> cconstantine: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<cconstantine> oops, sorry about pastebin-ing
<tamouse__> hello, #ruby
<adam12> o/
cdg has quit [Ping timeout: 252 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
halt has quit [Quit: ZNC 1.6.5 - http://znc.in]
<cosmicz> I'm trying to sanitize some input, which might be an active record or a string or something else. In my function, I have a bunch of lines that look like
vondruch has quit [Client Quit]
halt has joined #ruby
<cosmicz> input = input.method if input.responds_to(:method)
vondruch has joined #ruby
<cosmicz> Is there a better way?
<cosmicz> I was thinking of doing input.try(:method).try(:method2) but that might leave me with a nil instead of the method unapplied which is what I'd want
<adam12> responds_to?(:method) is fine.
<adam12> or be explicit with a case.
bruno- has joined #ruby
bruno-_ has joined #ruby
halt has quit [Client Quit]
<adam12> or use tell-don't-ask and make the same method available on all object classes you expect to sanitize.
Guest51638 has joined #ruby
Guest51638 has quit [Client Quit]
<cosmicz> tranks!
<adam12> cosmicz: I guess what I'm saying is, there's no right answer.
halt has joined #ruby
<adam12> Tho I'd say, chaining `try` is wrong.
twillkens has joined #ruby
mark_on_the_moon has quit [Ping timeout: 246 seconds]
nacsurte_ has quit [Ping timeout: 240 seconds]
Aidan_Gilmore has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<tamouse__> i'd agree
abrcdbr_ has quit [Remote host closed the connection]
cosmicz has quit [Quit: This computer has gone to sleep]
halt has quit [Quit: ZNC 1.6.5 - http://znc.in]
truenito has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
vondruch has quit [Client Quit]
vondruch has joined #ruby
halt has joined #ruby
millerti has joined #ruby
imode has quit [Ping timeout: 264 seconds]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
truenito has quit [Ping timeout: 248 seconds]
djbkd has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
mark_on_the_moon has joined #ruby
sp4rrow has joined #ruby
Aidan_Gilmore has quit [Quit: Aidan_Gilmore]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
CBebop has quit [Quit: See you later, Space Cowboy.]
vondruch has quit [Client Quit]
vondruch has joined #ruby
CBebop has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
wilbert has joined #ruby
tcopeland has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
imode has joined #ruby
djbkd has quit [Ping timeout: 248 seconds]
nowhere_man has joined #ruby
halt has quit [Quit: ZNC 1.6.5 - http://znc.in]
armatechnicos has joined #ruby
wilbert has quit [Quit: wilbert]
halt has joined #ruby
armatechnicos has quit [Quit: Leaving]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
armatechnicos has joined #ruby
pi1 has joined #ruby
cschneid_ has quit []
wlycdgr1 has joined #ruby
RedNifre has quit [Ping timeout: 248 seconds]
armatechnicos has quit [Quit: Leaving]
r3QuiEm_cL has joined #ruby
r3QuiEm_cL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
Defenestrate has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
cagomez has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
jackjackdripper has joined #ruby
d^sh has quit [Ping timeout: 248 seconds]
cagomez has quit [Ping timeout: 248 seconds]
d^sh has joined #ruby
enterprisey has joined #ruby
jackjackdripper has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
shimsham has quit [Quit: Leaving]
cconstantine has quit [Quit: cconstantine]
bronson has quit [Remote host closed the connection]
cagomez has joined #ruby
Puffball has joined #ruby
jackjackdripper has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bronson has joined #ruby
uZiel has joined #ruby
vondruch has quit [Quit: vondruch]
jameser has joined #ruby
vondruch has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cosmicz has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
agent_white has quit [Quit: leaving]
minimalism has quit [Quit: minimalism]
tcopeland has quit [Quit: tcopeland]
mark_on_the_moon has quit [Ping timeout: 248 seconds]
Azure has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Defenestrate has quit [Quit: This computer has gone to sleep]
uZiel has quit [Ping timeout: 268 seconds]
uZiel has joined #ruby
Defenestrate has joined #ruby
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
minimalism has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
tcopeland has joined #ruby
kriskropd has quit [Ping timeout: 248 seconds]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
akkad is now known as Ober
cagomez has joined #ruby
csaunders has quit [Quit: later tater]
cagomez has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
brent__ has quit [Remote host closed the connection]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
tcopeland has quit [Quit: tcopeland]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jinie has quit [Ping timeout: 248 seconds]
jinie has joined #ruby
arescorpio has joined #ruby
csaunders has joined #ruby
gix has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
gix has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
AnoHito has quit [Quit: Leaving]
AnoHito has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eightlimbed has joined #ruby
nacsurte has joined #ruby
uZiel has joined #ruby
jackjackdripper has joined #ruby
nacsurte has quit [Ping timeout: 260 seconds]
balazs_ has joined #ruby
kies has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
arescorpio has quit [Quit: Leaving.]
harfangk has joined #ruby
eightlimbed has quit [Ping timeout: 240 seconds]
balazs_ has quit [Ping timeout: 260 seconds]
nacsurte has joined #ruby
zautomata has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
ShalokShalom has joined #ruby
millerti has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
alex`` has joined #ruby
MarkBilk has quit [Ping timeout: 255 seconds]
alex`` is now known as alexherbo2
mtkd has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
alexherbo2 is now known as alex``
alex`` has quit [Client Quit]
millerti has quit [Ping timeout: 252 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
harfangk has quit [Ping timeout: 248 seconds]
vondruch has quit [Quit: vondruch]
uZiel has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
MarkBilk has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cout has quit [Remote host closed the connection]
ged has quit [Read error: Connection reset by peer]
SegFaultAX has quit [Quit: ZNC - http://znc.in]
vondruch has quit [Client Quit]
ged has joined #ruby
vondruch has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has joined #ruby
high_fiver has joined #ruby
kies has joined #ruby
cagomez has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
nacsurte has joined #ruby
uZiel has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
yaewa has joined #ruby
moei has quit [Ping timeout: 260 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
SeepingN has joined #ruby
dionysus69 has joined #ruby
graft has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
paradisaeidae has quit [Read error: Connection reset by peer]
paradisaeidae_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
uZiel has joined #ruby
harfangk has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
cdg has quit [Ping timeout: 246 seconds]
nacsurte has joined #ruby
Emmanuel_Chanel has joined #ruby
nacsurte has quit [Ping timeout: 252 seconds]
jamesaxl has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
uZiel has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
conta has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
uZiel has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
t-recx has joined #ruby
sp4rrow has quit [Quit: Textual]
cadillac_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
t-recx has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
cconstantine has joined #ruby
vondruch has joined #ruby
mtkd has joined #ruby
minimalism has quit [Quit: minimalism]
vondruch has quit [Client Quit]
vondruch has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
claudiuinberlin has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
nacsurte has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
nacsurte has quit [Ping timeout: 252 seconds]
uZiel has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
Silthias1 has joined #ruby
Emmanuel_Chanel has joined #ruby
Silthias has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
vondruch has quit [Client Quit]
abrcdbr has joined #ruby
vondruch has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
vondruch has quit [Quit: vondruch]
cagomez has joined #ruby
vondruch has joined #ruby
A124 has quit [Read error: No route to host]
jrm has quit [Quit: ciao]
jrm has joined #ruby
cconstantine has quit [Ping timeout: 248 seconds]
A124 has joined #ruby
cagomez has quit [Ping timeout: 248 seconds]
taurgal has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
_whitelogger has joined #ruby
cagomez has joined #ruby
vondruch has quit [Quit: vondruch]
cagomez has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
Ishido has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
vondruch has quit [Client Quit]
vondruch has joined #ruby
wlycdgr1 has quit [Ping timeout: 248 seconds]
Caius has quit [Ping timeout: 255 seconds]
kapil___ has joined #ruby
nacsurte has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<ruby[bot]> kapil___: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/ec7503fe5cab138cf56938b77e968630
<ruby[bot]> kapil___: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
nacsurte has quit [Ping timeout: 240 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
yeticry has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
uZiel has joined #ruby
abrcdbr_ has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
Dimik has quit [Ping timeout: 255 seconds]
abrcdbr has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
<kapil___> Please help I am not able to instantiate class. Check above gist.
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
biberu has joined #ruby
marr has joined #ruby
Caius has quit [Ping timeout: 240 seconds]
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
wlycdgr1 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
wlycdgr1 has quit [Ping timeout: 248 seconds]
uZiel has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
cagomez has joined #ruby
kreantos_ has quit [Remote host closed the connection]
kreantos has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
cagomez has quit [Ping timeout: 240 seconds]
kreantos has quit [Ping timeout: 246 seconds]
Defenestrate has quit [Quit: Leaving]
vondruch has quit [Quit: vondruch]
phatypus has joined #ruby
vondruch has joined #ruby
dionysus69 has joined #ruby
kreantos has joined #ruby
kreantos has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
kreantos has joined #ruby
phatypus has quit [Client Quit]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bronson has quit [Remote host closed the connection]
Caius has quit [Ping timeout: 240 seconds]
kreantos has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
nacsurte has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
govg has joined #ruby
r7c has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
alveric4 has quit [Quit: WeeChat 1.9]
anisha has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
belmoussaoui has joined #ruby
belmoussaoui has quit [Client Quit]
belmoussaoui has joined #ruby
harfangk has quit [Ping timeout: 240 seconds]
mochiyoda_ has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
aswen has joined #ruby
mochiyoda_ has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.8]
imode has quit [Ping timeout: 252 seconds]
belmoussaoui has quit [Read error: Connection reset by peer]
wlycdgr1 has joined #ruby
taurgal has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
wlycdgr1 has quit [Ping timeout: 248 seconds]
belmoussaoui has joined #ruby
Bhootrk_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
belmoussaoui has quit [Ping timeout: 240 seconds]
<linduxed> kapil___: that method returns a constant
<linduxed> well actually
<linduxed> first and foremost: you have not included the error that is returned
<kapil___> Hi
<linduxed> although i can assume that the error is ArgumentError
<linduxed> because `edit_component` takes no arguments, yet you have provided some
<kapil___> I not get error
<linduxed> well then what is your problem? what does "not works" mean?
<kapil___> When I call no argument passed
<kapil___> I tried many ways,but not successful, please help..
<linduxed> kapil___: if you have a method that where the first line is `def edit_component` then it takes no arguments
vondruch has quit [Quit: vondruch]
<linduxed> it would have to look like `def edit_component(i:, mode:)`
vondruch has joined #ruby
<linduxed> or `def edit_component(opts = {})`
<kapil___> But it returns class and I want to instantiate that class.
<linduxed> but not `def edit_component`
<linduxed> ok
<linduxed> in that case you will want to do this:
<linduxed> edit_component.new(i: 2, mode: "open")
naprimer2 has quit [Read error: Connection reset by peer]
<kapil___> It not works
<linduxed> what does it say?
naprimer has joined #ruby
<kapil___> Checking 1 min
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 240 seconds]
nacsurte has joined #ruby
vondruch has quit [Client Quit]
<kapil___> Does it work?
vondruch has joined #ruby
<kapil___> It instantiate objects, but I not read parameters in it.
nacsurte has quit [Ping timeout: 240 seconds]
<linduxed> kapil___: then you have to inspect how the class is defined. check the initialize method of StyleEditComponent
jackjackdripper has quit [Quit: Leaving.]
<linduxed> it might also be the case that by "it does not read parameters in it" you mean that some other method that you call on the instance of StyleEditComponent doesn't behave the way you expect
<linduxed> that's could also be the case, in which case you have to look at the class definition as well
<kapil___> Ok. That may problem. Checking
<kapil___> I can directly pass parameters, but not this way, so I am going to look class initialize method as you told me. Thanks
<kapil___> I have to contact ovener of library.
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
InfinityFye has joined #ruby
wlycdgr1 has joined #ruby
crst has joined #ruby
al2o3-cr has quit [Ping timeout: 252 seconds]
zautomata has quit [Ping timeout: 240 seconds]
<crst> How can I pass &:date as argument instead of a block here: .chart= area_chart Hash[cartops.group_by_month_of_year { |u| u.date }.map { |k, v| [k, v.size] }]
meinside has quit [Quit: Connection closed for inactivity]
wlycdgr1 has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
harfangk has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ShalokShalom_ has joined #ruby
brent__ has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
taurgal has joined #ruby
ShalokShalom has quit [Ping timeout: 252 seconds]
ShalokShalom_ is now known as ShalokShalom
<elomatreb> crst: [...].group_by_month_of_year(&:date) [...]
<crst> elomatreb: this works: .chart= area_chart Hash[cartops.group_by_month_of_year(&:date).map { |k, v| [k, v.size] }] thank you!
jamesaxl has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
hfp_work has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
abrcdbr has joined #ruby
hfp_work has joined #ruby
abrcdbr_ has quit [Ping timeout: 240 seconds]
abrcdbr has quit [Client Quit]
jamesaxl has quit [Read error: Network is unreachable]
jamesaxl has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
rprimus is now known as golgotha
clemens3 has quit [Quit: WeeChat 1.0.1]
bruno- has joined #ruby
bruno-_ has joined #ruby
abrcdbr has joined #ruby
nacsurte has joined #ruby
jamesaxl has quit [Read error: Network is unreachable]
bruno- is now known as Guest48096
bruno-_ has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
vondruch has quit [Quit: vondruch]
kreantos has joined #ruby
vondruch has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
bronson has joined #ruby
Guest48096 has quit [Read error: Connection reset by peer]
nacsurte has quit [Ping timeout: 248 seconds]
bruno-_ has joined #ruby
bruno-__ has joined #ruby
kreantos has quit [Ping timeout: 240 seconds]
bruno-_ has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 246 seconds]
bruno-__ has quit [Read error: Connection reset by peer]
kreantos has joined #ruby
bruno-_ has joined #ruby
bruno-__ has joined #ruby
bruno-__ has quit [Read error: Connection reset by peer]
bruno-_ has quit [Read error: Connection reset by peer]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
abrcdbr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has joined #ruby
wlycdgr1 has joined #ruby
cagomez has quit [Ping timeout: 248 seconds]
wlycdgr1 has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
KeyJoo has joined #ruby
ruby-lang446 has joined #ruby
clemens3 has joined #ruby
<ruby-lang446> I'm new to ruby, but I have a very interesting problem: I'm using open3.capture3 to run a command like a good little developer, but the output is not there.
clemens3 has quit [Client Quit]
vondruch has quit [Client Quit]
<ruby-lang446> AFAICT it seems to be sanitizing just a little too much for my purposes - but I have absolutely no way of verifying this
vondruch has joined #ruby
GodFather has quit [Ping timeout: 248 seconds]
clemens3 has joined #ruby
<ruby-lang446> any ideas?
alveric has joined #ruby
<Yxhuvud> are you looking at the stderr as well?
<ruby-lang446> I'm looking at status
kreantos has quit [Remote host closed the connection]
GodFather has joined #ruby
cagomez has joined #ruby
kreantos has joined #ruby
<ruby-lang446> in fact, the only way I can tell that the it might be sanitization is because the status comes back as an error
<ruby-lang446> stderr shows nothing
cagomez has quit [Ping timeout: 248 seconds]
kreantos has quit [Ping timeout: 252 seconds]
jgt_ has joined #ruby
<ruby-lang446> stderr should show something regardless, but nada
anisha has quit [Quit: This computer has gone to sleep]
nacsurte has joined #ruby
kreantos has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
sekmo has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
bronson has joined #ruby
<ruby-lang446> so what exactly is sanitized in the cmd when using open3?
bronson has quit [Ping timeout: 255 seconds]
chouhoulis has joined #ruby
taurgal has quit [Ping timeout: 260 seconds]
<matthewd> ruby-lang446: If you're using the multi-argument form, nothing gets sanitized.. the separated arguments are passed directly to the spawned process
<matthewd> ruby-lang446: If you're using the single-string form, then AFAIK it gets passed straight to the shell
chouhoulis has quit [Ping timeout: 240 seconds]
<ruby-lang446> so what am I missing then? The whole appears to not work
<ruby-lang446> stderr shows nothing which it at least should
<ruby-lang446> I'm running: stdout, stderr, wait_thr = Open3.capture3("pkg query %n-%v #{pkg}")
<ruby-lang446> I've tried separated as well
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
<matthewd> You could try stdout, stderr, wait_thr = Open3.capture3("ruby -e 'p ARGV' pkg query %n-%v #{pkg}")
<matthewd> Just to confirm the arguments it's seeing
vondruch has joined #ruby
wlycdgr1 has joined #ruby
vondruch has quit [Client Quit]
ur5us has joined #ruby
GodFather has quit [Ping timeout: 248 seconds]
<ruby-lang446> Well I'd say it looks as expected... so wtf? I still should be seeing something from somewhere - all I get is a status with a pid and an error code (Process::Status object)
<ruby-lang446> speaking of which - if I take wait_thr.value it gives me an error as well
<matthewd> Does the status code give any hint?
vondruch has joined #ruby
<ruby-lang446> which in reading the docs - they all use - should happen
FastJack_ has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
wlycdgr1 has quit [Ping timeout: 240 seconds]
<ruby-lang446> not really - gives some large value (134 I think) which is not in the man
<matthewd> > When a command terminates on a fatal signal N, bash uses the value of 128+N as the exit status.
<matthewd> Maybe relevant?
cagomez has joined #ruby
<ruby-lang446> to be sure - except that there no status codes in the man
<ruby-lang446> the only definitive is that 0 is good ;)
<ruby-lang446> but there should be output on stderr - so why can't I get to it?
<ruby-lang446> just tried stderr.length and came back 0
<ruby-lang446> am I misusing the function?
<matthewd> Try running a different command?
runescape07rsps has quit [Ping timeout: 252 seconds]
cagomez has quit [Ping timeout: 248 seconds]
<matthewd> stdout, stderr, wait_thr = Open3.capture3("bash -c xyzzy") ?
<ruby-lang446> isn't that what ruby is already?
<matthewd> I mean literally that
<matthewd> I want something with a sufficiently predictable stderr, so that I can reproduce it
<ruby-lang446> I did - and stderr.length shows 31 now
GodFather has joined #ruby
<ruby-lang446> and the string is same as expected as well
<ruby-lang446> wtf?
<matthewd> Okay, so it sounds like the [other] command really is failing with no output
<ruby-lang446> why though?
<matthewd> Are you running this ruby script directly? Not in a different user/env from when you run the command manually?
<ruby-lang446> I'm running: ruby <script> <arg>
phinxy has joined #ruby
<ruby-lang446> having said that it had no trouble with bash, so....
<matthewd> But running pkg manually gives useful stderr
nopolitica has joined #ruby
<ruby-lang446> indeed
<ruby-lang446> actually... ruby ran fine too
phinxy has left #ruby [#ruby]
<ruby-lang446> it executed fine in the capture function
<ruby-lang446> and even if I give the full path to pkg it fails
<ruby-lang446> I just tried irb, and if I require open3 it errors
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<ruby-lang446> scratch that - wasn't holding my mouth right. I needed to put the module in quotes
<ruby-lang446> but still stderr is nil
<ruby-lang446> is there something odd with the way ruby process status codes? I just got a status code 69 from my cmd
<matthewd> Nothing odd that I know of
<ruby-lang446> its different in irb is all I can see
<matthewd> Maybe put `; echo foo` onto the end of the command or something?
nacsurte has joined #ruby
<ruby-lang446> great - stdout now has "foo" :)
<ruby-lang446> still can't figure out whats wrong with pkg
<ruby-lang446> nuts!
<ruby-lang446> at least capture is working fine as it should
uZiel has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nacsurte has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 248 seconds]
<ruby-lang446> no luck using backticks either
<ruby-lang446> using the bash command exits status 127
DaniG2k has joined #ruby
mtkd has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
rippa has joined #ruby
nacsurte has joined #ruby
<matthewd> ruby-lang446: What happens if you run a query that is valid, but has no results?
<matthewd> (in your shell, no ruby involved)
nacsurte has quit [Ping timeout: 248 seconds]
DaniG2k has quit [Ping timeout: 240 seconds]
runescape07rsps has joined #ruby
DaniG2k has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby-lang446> do you mean status code?
<matthewd> I mean what is pkg's observed behaviour if you ask it about packages that don't exist
<ruby-lang446> I think I may have figured some of it out - the return code is meant to be 69 (breaking all convention)
ur5us has quit [Remote host closed the connection]
<ruby-lang446> if I ask about an invalid pkg it comes back with nothing
<ruby-lang446> status code stays the same
wlycdgr1 has joined #ruby
taurgal has joined #ruby
<matthewd> I'd venture that's what's happening, then
<ruby-lang446> what I had was a valid pkg, but it wasn't finding it. Somewhere along the way I had sorted it, but missed that point. That also produces no output
<ruby-lang446> I was using a couple of different pkgs, but got stuck on just one (as you do)
Sammichmaker has joined #ruby
<ruby-lang446> the others are fine, but that still doesn't resolve a couple of things
<ruby-lang446> if I check the exit code - it fails
<ruby-lang446> I've got wait_thr.to_i != 69 now, but it still runs the failed code
<ruby-lang446> so it's not reading that correctly
<matthewd> to_i and exitstatus aren't necessarily the same
<matthewd> Actually, I don't think they're ever the same (unless they're both zero)
wlycdgr1 has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
sekmo has quit [Quit: Textual IRC Client: www.textualapp.com]
<ruby-lang446> and the docs all say to use wait_thr.value.exitstatus
<ruby-lang446> but value fails with an error of not existing every time
<matthewd> open3 returns a thread; capture3 returns the Process::Status directly
harfangk has quit [Quit: No Ping reply in 180 seconds.]
tcopeland has joined #ruby
harfangk has joined #ruby
<ruby-lang446> I'm pretty sure that the docs stated that in the example for open3.capture3
milardovich has quit [Remote host closed the connection]
t-recx has joined #ruby
<ruby-lang446> so Process:Status is an object, right?
<ruby-lang446> isn't that object standard?
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
runescape07rsps has quit [Ping timeout: 264 seconds]
__Yiota has joined #ruby
<matthewd> "standard"? It's a built-in class if that's what you mean
<ruby-lang446> basically, yeah :)
<ruby-lang446> I mean its used for all open3 and others as well
vondruch has quit [Client Quit]
vondruch has joined #ruby
<ruby-lang446> I don't know... eventually I'll crack it :)
<ruby-lang446> thanks for the help matthewd - I'd better go rest the brain for a bit and then keep going :) thanks again
<matthewd> You're welcome, and good luck :)
<ruby-lang446> I reckon I'll need it - brains hurting just getting that far!
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
tsia has joined #ruby
graft has joined #ruby
Jey has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
Jey2 has joined #ruby
tsia has joined #ruby
tcopeland has quit [Quit: tcopeland]
Jey has quit [Ping timeout: 248 seconds]
tsia has quit [Client Quit]
milardovich has quit [Remote host closed the connection]
harfangk has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
wlycdgr1 has joined #ruby
tcopeland has joined #ruby
milardovich has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
apparition has joined #ruby
wlycdgr1 has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
Jey2 has quit [Remote host closed the connection]
Jey2 has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
milardovich has joined #ruby
tsia has joined #ruby
tcopeland has quit [Quit: tcopeland]
nopolitica has quit [Ping timeout: 260 seconds]
thinkpad has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
DaniG2k has quit [Quit: leaving]
thinkpad has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
ted_ has joined #ruby
ted_ has quit [Read error: Connection reset by peer]
vondruch has quit [Client Quit]
milardovich has joined #ruby
vondruch has joined #ruby
nopolitica has joined #ruby
milardovich has quit [Remote host closed the connection]
jameser has joined #ruby
brent__ has joined #ruby
wlycdgr1 has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 240 seconds]
Hanma[m] has joined #ruby
wlycdgr1 has quit [Ping timeout: 240 seconds]
twillkens has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
govg has quit [Ping timeout: 248 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
govg has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
wlycdgr1 has joined #ruby
jamesaxl has joined #ruby
wlycdgr1 has quit [Ping timeout: 255 seconds]
milardovich has joined #ruby
Guest5944 has joined #ruby
r7c has quit [Quit: Leaving]
jinie has quit [Ping timeout: 240 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jinie has joined #ruby
milardovich has quit [Remote host closed the connection]
runescape07rsps has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
milardovich has joined #ruby
s3nd1v0g1us has quit [Remote host closed the connection]
wlycdgr1 has joined #ruby
tcopeland has joined #ruby
Jey2 has quit [Quit: Leaving]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ledestin has joined #ruby
t-recx has quit [Quit: t-recx]
marr has quit [Remote host closed the connection]
vondruch has quit [Client Quit]
vondruch has joined #ruby
sekmo has joined #ruby
ledestin has quit [Ping timeout: 248 seconds]
Guest5944 has quit [Quit: Page closed]
phinxy has joined #ruby
phinxy has quit [Read error: Connection reset by peer]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
syamaoka has quit [Quit: ZNC 1.6.5 - http://znc.in]
marr has joined #ruby
mathys has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
milardovich has quit [Remote host closed the connection]
vondruch has quit [Client Quit]
minimalism has joined #ruby
vondruch has joined #ruby
neo95 has joined #ruby
tcopeland has quit [Quit: tcopeland]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has joined #ruby
cout has joined #ruby
bronson has joined #ruby
herbmillerjr has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
twillkens has quit [Ping timeout: 248 seconds]
Ishido has quit [Ping timeout: 248 seconds]
twillkens has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
jameser has quit [Max SendQ exceeded]
nopolitica has quit [Ping timeout: 246 seconds]
jameser has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
jameser has quit [Client Quit]
uZiel has joined #ruby
milardovich has quit [Remote host closed the connection]
Ishido has joined #ruby
milardovich has joined #ruby
mathys has quit [Quit: Leaving]
ShalokShalom has quit [Read error: Connection reset by peer]
ShalokShalom has joined #ruby
jgt has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
skweek has joined #ruby
milardovich has quit [Remote host closed the connection]
jgt_ has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 248 seconds]
vondruch has quit [Client Quit]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
vondruch has joined #ruby
goyox86 has joined #ruby
wlycdgr1 has quit [Ping timeout: 240 seconds]
kreantos_ has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
t-recx has joined #ruby
kreantos has quit [Ping timeout: 240 seconds]
goyox86 has quit [Client Quit]
goyox86 has joined #ruby
imode has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
kreantos_ has quit [Ping timeout: 248 seconds]
sekmo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Client Quit]
vondruch has joined #ruby
orbyt_ has joined #ruby
dionysus69 has joined #ruby
tsia has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
cconstantine has joined #ruby
milardovich has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit.]
Immune has joined #ruby
SeepingN has joined #ruby
banisterfiend has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
banisterfiend has quit [Client Quit]
FastJack_ has quit [Quit: leaving]
FastJack has joined #ruby
apparition has quit [Quit: Bye]
uZiel has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
kriskropd has joined #ruby
kriskropd has quit [Changing host]
kriskropd has joined #ruby
wald0 has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
maryo has joined #ruby
jamesaxl has joined #ruby
anisha has joined #ruby
Dimik has joined #ruby
abrcdbr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
nunchuck has quit [Ping timeout: 248 seconds]
FahmeF has joined #ruby
rfshark has joined #ruby
wlycdgr1 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
wlycdgr1 has quit [Ping timeout: 252 seconds]
rfshark has quit [Quit: rfshark]
tcopeland has joined #ruby
mson has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
vondruch has quit [Client Quit]
vondruch has joined #ruby
bronson has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
tcopeland has quit [Quit: tcopeland]
vondruch has quit [Client Quit]
vondruch has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
vondruch has quit [Quit: vondruch]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
cconstantine has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
cosmicz has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
anisha has joined #ruby
cosmicz has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
anisha has quit [Client Quit]
r3QuiEm_cL has joined #ruby
imode has quit [Ping timeout: 255 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
milardovich has joined #ruby
wlycdgr1 has joined #ruby
vondruch has quit [Client Quit]
dviola has joined #ruby
brahmana has joined #ruby
cconstantine has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
InfinityFye has quit [Quit: Leaving]
cadillac_ has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
s00pcan has quit [Ping timeout: 248 seconds]
cadillac_ has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
GodFather has quit [Ping timeout: 248 seconds]
r3QuiEm_cL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit [Ping timeout: 240 seconds]
high_fiver has quit [Ping timeout: 248 seconds]
FahmeF has quit [Remote host closed the connection]
FahmeF has joined #ruby
GodFather has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nacsurte has joined #ruby
s00pcan has joined #ruby
GodFather has quit [Read error: No route to host]
GodFather has joined #ruby
zachk has joined #ruby
FahmeF has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
joelwallis has joined #ruby
vondruch has joined #ruby
<kspencer> umm, would there be a reason why there is no AF_INET when there is a AF_INET6, I'm trying to filter ip addresses based on family using IPAddr and I can't really do that if Socket doesn't have INET(4)
maryo has quit [Ping timeout: 255 seconds]
selim has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
selim has joined #ruby
vondruch has joined #ruby
abrcdbr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has quit [Quit: WeeChat 1.8]
__Yiota has joined #ruby
neo95 has quit [Quit: Leaving]
taurgal has quit [Ping timeout: 248 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
r3QuiEm_cL has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
r3QuiEm_cL has quit [Client Quit]
QualityAddict has quit [Remote host closed the connection]
wlycdgr1 has quit [Ping timeout: 240 seconds]
dthams has joined #ruby
tsia has joined #ruby
zapata has quit [Ping timeout: 264 seconds]
clemens3 has quit [Quit: WeeChat 1.0.1]
mtkd has quit [Ping timeout: 248 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
DoubleMalt has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Client Quit]
vondruch has joined #ruby
tsia has joined #ruby
__Yiota has joined #ruby
nunchuck has joined #ruby
zapata has joined #ruby
gusrub has joined #ruby
jackjackdripper has joined #ruby
__Yiota has quit [Client Quit]
funkytwig has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
gusrub has quit [Remote host closed the connection]
vondruch has quit [Client Quit]
vondruch has joined #ruby
bronson has joined #ruby
cconstantine has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
tcopeland has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 248 seconds]
gusrub has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
pi1 is now known as RedNifre
jackjackdripper has quit [Quit: Leaving.]
crst has quit [Quit: Leaving...]
goyox86 has quit [Quit: goyox86]
goyox86 has joined #ruby
tcopeland has quit [Quit: tcopeland]
Sembei has joined #ruby
Silthias has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
troys has joined #ruby
Pisuke has quit [Ping timeout: 252 seconds]
t-recx has quit [Quit: t-recx]
reaVer has quit [Remote host closed the connection]
reaVer has joined #ruby
guille-moe has joined #ruby
wald0 has quit [Quit: Lost terminal]
dviola has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
twillkens has quit [Ping timeout: 248 seconds]
joelwallis has quit [Remote host closed the connection]
<brahmana> Hi all..
<brahmana> I am trying to figure out where a particular exception is being swallowed. byebug is not helping since it is not stepping `into` the code resulting in the exception.
<brahmana> Any suggestions to figure out who is swallowing the exception?
dionysus69 has quit [Ping timeout: 240 seconds]
<brahmana> Note : This is a Rails 4.0 app and the relevant code is in ActiveSupport 4.0.2 related to monkey patching the DateTime#<==> method
gusrub has quit [Remote host closed the connection]
twillkens has joined #ruby
_sfiguser has quit [Quit: Leaving]
meadmoon has joined #ruby
meadmoon has quit [Client Quit]
<matthewd> brahmana: Ruby swallows exceptions internally in some Comparable methods
<brahmana> matthewd: This is the code I am talking about : https://pastebin.com/w16ySRP1
<ruby[bot]> brahmana: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b4eeee7e807af8d4b521c4813b4e8a67
<ruby[bot]> brahmana: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<brahmana> matthewd: The `other.to_datetime` is what should cause an exception, since `other` is a symbol.
webnanners has quit [Ping timeout: 260 seconds]
<brahmana> Ironically (or otherwise) the value in that symbol where it should error out is :nil
<brahmana> Now if I do `:nil.to_datetime` in the Rails console, it does error out. So shouldn't the above code result in the same exception even before the control hits `super` ?
<matthewd> Are you calling <=> directly, though?
webnanners has joined #ruby
<brahmana> Nope
<brahmana> oh.. ok..
Azure has joined #ruby
biberu has quit []
<brahmana> So when I do `datetime_object == symbol`, the core `==` gets called which in turn calls the overridden `<==>`. Is that what happens?
<brahmana> And please continue to replace <==> with <=> in my statements, like you have already done now.. !
<matthewd> Yes
<matthewd> IIRC Comparable contains approximately `def ==(other); (self <=> other) == 0; rescue; false; end`
jrabe has quit []
revolt has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jrabe has joined #ruby
<matthewd> This changed in more recent ruby versions
aswen has quit [Quit: WeeChat 1.6]
ozialien has joined #ruby
<brahmana> matthewd: That answers it.. Thank you very much.
troys is now known as troys_
guille-moe has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
QualityAddict has joined #ruby
isBEKaml has joined #ruby
claudiuinberlin has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<brahmana> matthewd: Do you happen to remember which version of Ruby changed that behaviour of Comparable?
<matthewd> Looks like 2.1 warned, and 2.2+ let the exception through
isBEKaml has quit [Quit: leaving]
vondruch has quit [Client Quit]
vondruch has joined #ruby
<TastyTrout> conflicted about ruby2 sometimes. seems very buggy
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WeiJunLi has joined #ruby
<brahmana> matthewd: Looks like it was 2.3 that changed the behaviour. Rescue exists till 2.2.7.
jrabe has quit []
jrabe has joined #ruby
jackjackdripper has joined #ruby
belmoussaoui_ has joined #ruby
armyriad has quit [Ping timeout: 248 seconds]
lxsameer has joined #ruby
abrcdbr has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
cconstantine has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
rhyselsmore has joined #ruby
WeiJunLi has quit [Remote host closed the connection]
frozengeek has quit [Read error: Connection reset by peer]
frozengeek has joined #ruby
bronson has joined #ruby
shime has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
abrcdbr_ has joined #ruby
abrcdbr_ has quit [Remote host closed the connection]
abrcdbr has quit [Ping timeout: 240 seconds]
Azure has quit [Read error: Connection reset by peer]
pi1 has joined #ruby
Azure has joined #ruby
RedNifre has quit [Ping timeout: 248 seconds]
mark_on_the_moon has joined #ruby
brahmana has quit [Quit: Page closed]
gfvcastro has joined #ruby
belmoussaoui__ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
belmoussaoui_ has quit [Ping timeout: 252 seconds]
cconstantine has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
revolt has quit [Quit: This computer has gone to sleep]
kapil___ has joined #ruby
<kapil___> i defined array [ {a: 1}, {a:2}]
<kapil___> how i get each "a" from it? please tell me.
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
shime has quit [Ping timeout: 260 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
gfvcastro has quit [Read error: Connection reset by peer]
meadmoon has joined #ruby
meadmoon has quit [Client Quit]
maxschwenk has joined #ruby
FahmeF has joined #ruby
gusrub has joined #ruby
noobineer has joined #ruby
FahmeF has quit [Ping timeout: 240 seconds]
<nofxx> kapil___, array[n][:a] , where n is which element inside you want to access
<kapil___> thanks
<kapil___> great
goyox86 has quit [Quit: goyox86]
zachk has quit [Quit: g'night all]
mtkd has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
mtkd has joined #ruby
herbmillerjr has joined #ruby
Sembei has quit [Ping timeout: 240 seconds]
neo95 has joined #ruby
enterprisey has quit [Remote host closed the connection]
<neo95> hello there fellas. could anybody help me get a script running from another .rb script
<neo95> like i want the second script to run then finish and return to the other script
r3QuiEm_cL has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
alveric1 has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
alveric has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
tcopeland has joined #ruby
brent__ has joined #ruby
marr has quit [Ping timeout: 246 seconds]
r3QuiEm_cL has quit [Quit: Textual IRC Client: www.textualapp.com]
vondruch has quit [Client Quit]
vondruch has joined #ruby
Puffball has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
ShalokShalom is now known as haywire
haywire is now known as heywire
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
maxschwenk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Client Quit]
vondruch has joined #ruby
houhoulis has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doublemalt_ has joined #ruby
heywire is now known as ShalokShalom
nowhere_man has joined #ruby
bronson has joined #ruby
brent__ has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
maxschwenk has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 240 seconds]
Azure has quit [Read error: Connection reset by peer]
vondruch has quit [Client Quit]
Azure has joined #ruby
vondruch has joined #ruby