apeiros changed the topic of #ruby-lang to: Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste code on https://gist.github.com
baweaver has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
alestuber has quit [Remote host closed the connection]
joaomdmo_ has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
dorei has quit []
bruno-_ has quit [Ping timeout: 265 seconds]
haraoka has joined #ruby-lang
marr has quit []
[H]unt3r has quit [Read error: No route to host]
hahuang61 has joined #ruby-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
djbkd has quit [Remote host closed the connection]
Musashi007 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 264 seconds]
joaomdmoura has joined #ruby-lang
benlovell has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
lewis has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
lewis is now known as lewix
arooni-mobile has joined #ruby-lang
havenwood has joined #ruby-lang
benlovell has quit [Ping timeout: 272 seconds]
car has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
Musashi007 has joined #ruby-lang
lewix has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
bantic has joined #ruby-lang
car has quit [Quit: Leaving]
|jemc| has quit [Ping timeout: 265 seconds]
chadwtaylor has joined #ruby-lang
tkuchiki has joined #ruby-lang
mattwildig has joined #ruby-lang
bantic has quit [Ping timeout: 244 seconds]
hahuang61 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
bantic has joined #ruby-lang
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Musashi007 has joined #ruby-lang
xcesariox has joined #ruby-lang
fujimura has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
havenwood has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
joaomdmo_ has joined #ruby-lang
joaomdmoura has quit [Read error: Connection reset by peer]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby-lang
konsolebox has joined #ruby-lang
bantic has quit [Quit: bantic]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby-lang
mattwildig has quit []
billybob00 has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
hahuang61 has joined #ruby-lang
<billybob00> is there a way to break out of a method altogether if I call the method inside itself? if that makes sense?
hahuang61 has quit [Ping timeout: 252 seconds]
<billybob00> I want to be able to break out of the entire method once I find what I'm looking for
<bnagy> return?
<bnagy> complicated nesting if whatever return found end end complicated nesting "Not Found!"
<billybob00> bnagy: not sure I follow
<womble> billybob00: You can exit a method early by calling "return"
<billybob00> yes, I do have a return statement in there
haraoka has quit [Ping timeout: 272 seconds]
<womble> Then your problem is solved.
<billybob00> the problem is when I can the method within itself
<billybob00> can = call
<womble> billybob00: Show us your code.
<billybob00> i know there's probably a better way of doing this
<womble> I'm sure we'll let you know.
<womble> billybob00: Stick a return at the beginning of line 4
<womble> If you only want to return if the find_task on line 4 actually finds something, then you can do (t = find_task(suite_action['Actions'], id)) && return t
<bnagy> :<
<billybob00> ahhhhhh
<billybob00> thank you so much!!!
<womble> bnagy: You disapprove of my approach?
<bnagy> yeah I don't like && logic one-liners
<womble> Well, you can turn it into an if instead if you like: return t if t = find_task(...)
RickHull has joined #ruby-lang
<bnagy> much nicer :)
<womble> bnagy: Been writing too much bash lately...
<bnagy> I'm sorry
<womble> So is future me. <grin>
chadwtaylor has quit [Remote host closed the connection]
<womble> What do you mean "start"? I've been an asshole for years.
bruno- has joined #ruby-lang
crdpink has joined #ruby-lang
crdpink2 has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 256 seconds]
manveru has quit [Read error: Connection reset by peer]
adambeynon has quit [Ping timeout: 252 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manveru has joined #ruby-lang
adambeynon has joined #ruby-lang
michael_mbp has quit [Excess Flood]
kuroro has joined #ruby-lang
kuroro2 has joined #ruby-lang
kuroro2 has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: zzz]
michael_mbp has joined #ruby-lang
xcesariox has quit [Quit: Textual IRC Client: www.textualapp.com]
revath has joined #ruby-lang
araujo_ has quit [Quit: Leaving]
gix has quit [Ping timeout: 272 seconds]
gix has joined #ruby-lang
hahuang61 has joined #ruby-lang
revath has quit [Ping timeout: 272 seconds]
chadwtaylor has joined #ruby-lang
hahuang61 has quit [Ping timeout: 276 seconds]
crdpink2 has joined #ruby-lang
crdpink has quit [Ping timeout: 265 seconds]
RickHull has quit [Ping timeout: 246 seconds]
glover has joined #ruby-lang
glover is now known as tui
fujimura has quit [Remote host closed the connection]
<tui> is the pry gem down? I'm getting ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Not Found 404 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/pry-0.10.1-x86-mingw32.gemspec. rz)
<tui> other gems install ok though
<tui> this is on ruby 2.2
arooni-mobile has quit [Ping timeout: 256 seconds]
fujimura has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
wallerdev has joined #ruby-lang
arooni-mobile has joined #ruby-lang
fujimura has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby-lang
kuroro has left #ruby-lang ["Leaving"]
charliesome has joined #ruby-lang
billybob00 has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby-lang
<womble> There's a space in there that there probably shouldn't be.
<womble> Although even correcting that, I'm still getting a 404 on that URL.
<tui> womble: thanks yeah that cut off from the powershell output. thanks
djbkd has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
datanoise has joined #ruby-lang
revath has joined #ruby-lang
hahuang61 has quit [Ping timeout: 244 seconds]
revath1 has joined #ruby-lang
revath has quit [Ping timeout: 272 seconds]
fujimura has joined #ruby-lang
Musashi007 has joined #ruby-lang
workmad3 has joined #ruby-lang
xcesariox has joined #ruby-lang
Musashi007 has quit [Client Quit]
workmad3 has quit [Ping timeout: 252 seconds]
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
|jemc| has joined #ruby-lang
tui has quit [Quit: Page closed]
cubicme has joined #ruby-lang
caseypatrickdris has quit [Remote host closed the connection]
cubicme has quit [Client Quit]
cubicme has joined #ruby-lang
revath1 has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby-lang
joaomdmoura has joined #ruby-lang
revath has joined #ruby-lang
joaomdmo_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
hahuang61 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 240 seconds]
revath1 has joined #ruby-lang
datanoise has quit [Quit: leaving]
revath has quit [Ping timeout: 264 seconds]
AmirolAhmad has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
bruno- has joined #ruby-lang
chinmay_dd has joined #ruby-lang
konsolebox has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby-lang
bruno- has quit [Ping timeout: 272 seconds]
kerunaru has joined #ruby-lang
fusillicode has quit [Ping timeout: 265 seconds]
arooni-mobile has quit [Ping timeout: 256 seconds]
riotjones has joined #ruby-lang
|jemc| has quit [Ping timeout: 258 seconds]
xcesariox has quit [Remote host closed the connection]
micmus has quit [Ping timeout: 264 seconds]
jas02 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
_ht has joined #ruby-lang
conanza has joined #ruby-lang
conanza has quit [Client Quit]
revath1 has quit [Ping timeout: 244 seconds]
revath has joined #ruby-lang
hahuang61 has joined #ruby-lang
arBmind has joined #ruby-lang
fedexo has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
revath has quit [Read error: No route to host]
revath has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
kerunaru has quit [Read error: No route to host]
ta has joined #ruby-lang
ledestin has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
fujimura has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
michael_mbp has joined #ruby-lang
joaomdmoura has joined #ruby-lang
Guest24 is now known as lele_
chadwtaylor has quit [Remote host closed the connection]
Ilyes512 has joined #ruby-lang
kwd has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
kwd has joined #ruby-lang
Iskarlar has joined #ruby-lang
jas02 has quit [Quit: jas02]
Forgetful_Lion has joined #ruby-lang
pyo_ has joined #ruby-lang
kerunaru has joined #ruby-lang
fujimura has joined #ruby-lang
pyo_ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
joaomdmoura has quit [Remote host closed the connection]
ta has joined #ruby-lang
ta has quit [Remote host closed the connection]
dhjondoh has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby-lang
AmirolAhmad has quit []
symm- has quit [Ping timeout: 265 seconds]
stdtnt_ has joined #ruby-lang
stdtnt_ has quit [Client Quit]
GBrawl has joined #ruby-lang
stdtnt has joined #ruby-lang
jas02 has joined #ruby-lang
benlovell has joined #ruby-lang
k3asd` has joined #ruby-lang
hahuang61 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
elia has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
kerunaru has quit [Read error: Connection reset by peer]
ur5us has quit []
solars has joined #ruby-lang
ledestin has quit [Ping timeout: 246 seconds]
tomaz_b has joined #ruby-lang
kerunaru has joined #ruby-lang
allomov has joined #ruby-lang
charliesome has quit [Quit: zzz]
bruno- has joined #ruby-lang
pyo_ has joined #ruby-lang
ta has joined #ruby-lang
k3asd` has quit [Quit: leaving]
k3asd` has joined #ruby-lang
GBrawl has quit [Ping timeout: 276 seconds]
bruno- has quit [Ping timeout: 265 seconds]
VinnyBoy has quit [Read error: Connection reset by peer]
fusillicode has joined #ruby-lang
kerunaru has quit [Max SendQ exceeded]
kerunaru has joined #ruby-lang
fedexo has quit [Ping timeout: 265 seconds]
joaomdmoura has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
skade has joined #ruby-lang
kerunaru has quit [Read error: Connection reset by peer]
fujimura has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
ArchRogem has joined #ruby-lang
TvL2386 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
workmad3 has joined #ruby-lang
fedexo has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
<TvL2386> hi guys, I'm trying to get the hang of TDD and I'm using Test::Unit. I'm searching for documention on how to do stubs and mocks with test::unit. Do you guys have any pointers for me? I can only find other things like mocha. Is this the way to go?
hahuang61 has joined #ruby-lang
<jhass> you're sure it's test-unit and not minitest pretending to be test-unit ?
<pipework> Or mini-unit pretending to be test-test? The horror.
<TvL2386> jhass, minitest is not a dependency, so it must be the stdlib test-unit
<TvL2386> I don't want to pull in a dependency like mocha unless it's necessary
<jhass> depending on your ruby version minitest is in stdlib
<ljarvis> any respectable ruby version
<pipework> TvL2386: What version of ruby are you using?
<TvL2386> I'm using ruby-2.1
<pipework> Then it's mini-test, iirc.
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> minitest
<pipework> ljarvis: It's a joke about Test::Unit and minitest.
<jhass> "If you are writing new test code, please use MiniTest instead of Test::Unit."
hahuang61 has quit [Ping timeout: 256 seconds]
<pipework> I believe the shims are still in 2.1 for Test::Unit
<TvL2386> I see! Thanks!
araujo has joined #ruby-lang
araujo has joined #ruby-lang
araujo has quit [Max SendQ exceeded]
LBo has quit [Ping timeout: 258 seconds]
rippa has joined #ruby-lang
kerunaru has joined #ruby-lang
<TvL2386> swapping to minitest was very easy!
stdtnt has quit [Quit: Leaving]
ur5us has joined #ruby-lang
intinig has joined #ruby-lang
intinig has quit [Remote host closed the connection]
joaomdmoura has joined #ruby-lang
fedexo has quit [Ping timeout: 256 seconds]
joaomdmoura has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
skyrocker has joined #ruby-lang
skyrocker1 has quit [Ping timeout: 246 seconds]
arBmind has joined #ruby-lang
chinmay_dd has quit []
araujo has joined #ruby-lang
intinig has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
skyrocker1 has joined #ruby-lang
skyrocker has quit [Ping timeout: 245 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
hahuang61 has quit [Ping timeout: 256 seconds]
iamninja has quit [Ping timeout: 256 seconds]
Ropeney has joined #ruby-lang
fujimura has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
fusillicode has joined #ruby-lang
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby-lang
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby-lang
stamina has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ilyes512 has joined #ruby-lang
the_real_intinig has joined #ruby-lang
intinig has quit [Read error: Connection reset by peer]
skyrocker has joined #ruby-lang
intinig has joined #ruby-lang
skyrocker1 has quit [Ping timeout: 252 seconds]
the_real_intinig has quit [Ping timeout: 265 seconds]
hahuang61 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
chinmay_dd has joined #ruby-lang
banister has joined #ruby-lang
<yorickpeterse> hello from south korea
<yorickpeterse> "vacation" it's called apparently
<yorickpeterse> aka "FOSS work abroad"
bruno- has joined #ruby-lang
<tbuehlmann> could you check the Kia Rio? rented it for a road trip and I want to know if it's any good
hahuang61 has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
konsolebox has quit [Quit: Leaving]
<yorickpeterse> Kia Rio?
<bougyman> it's not the worst car you could rent.
<bougyman> but it's on the contestant list.
<yorickpeterse> I don't drive
<yorickpeterse> So no I can't :P
tkuchiki has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
cubicme has quit [Ping timeout: 246 seconds]
jas02_ has joined #ruby-lang
jas02 has quit [Ping timeout: 264 seconds]
jas02_ is now known as jas02
fujimura has quit [Remote host closed the connection]
franckverrot has quit [Ping timeout: 272 seconds]
jas02_ has joined #ruby-lang
jas02 has quit [Ping timeout: 250 seconds]
jas02_ is now known as jas02
michael_mbp has quit [Excess Flood]
GBrawl has joined #ruby-lang
fujimura has joined #ruby-lang
skade has joined #ruby-lang
bougyman has quit [Ping timeout: 272 seconds]
michael_mbp has joined #ruby-lang
<TvL2386> how do you stub an instance method in minitest? I'm trying this: http://www.rubydoc.info/gems/minitest/Object#stub-instance_method but it only seems to work for this class variable example.
<TvL2386> *class method example I mean
<TvL2386> should be part of minitest if you ask me
<oddmunds> TvL2386: i guess not having stuff like that is what makes minitest mini.
<TvL2386> oddmunds, maybe, but these extra 25 lines add a very nice feature if you ask me
<oddmunds> yeah
<oddmunds> i would like to run the tests that failed the last run first
ldnunes has joined #ruby-lang
<womble> TvL2386: The problem is that when you ask everyone which extra 25 lines add a very nice feature, you end up with RSpec.
<tbuehlmann> yorickpeterse, you could visit the manufactoring hall and check the employee's motivation
benlovell has quit [Ping timeout: 272 seconds]
pyo_ has quit [Read error: Connection reset by peer]
pyo_ has joined #ruby-lang
dorei has joined #ruby-lang
hahuang61 has joined #ruby-lang
<TvL2386> womble, lol!
hahuang61 has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has joined #ruby-lang
banister has quit [Client Quit]
<TvL2386> please forgive me for being such a newb on TDD and I hope I'm being clear, but I have an object that uses another object to query an external resource (proprietary protocol). I want to simulate the methods of this 'other object'. I think I'll have to create a new object to react exactly like the original and replace it in the instance variable of the original object?
<TvL2386> *ducks quickly behind a bench to avoid eggs and rotten tomatoes*
<womble> TvL2386: There's a few ways around that. I don't know if minitest's mocks do this, but rspec-mocks has an "any instance of" mock specifier, so you can say, "expect any instance of SomeClass to receive foo and return value"
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
<womble> You can also stub the Class.new method, and have it return a mock object
<TvL2386> womble, oh nice :-)
<womble> Finally, if you've designed your class in a certain way, called "Dependency Injection", you should be creating your class by passing in all of what it needs, so you'd create an instance of your interface class and pass that in. For testing, you'd pass in a mock instead of the real interface object.
<womble> (That made more sense in my head... let me know if you'd like an example of that last bit)
<TvL2386> womble, luckily you make that second remark on your own! It's not entirely my limitation for not understanding then :-)
<womble> OK, I'll whip up a quick example of dependency injection.
<TvL2386> womble, I really appreciate your help womble!! Thanks!
ArchRogem has joined #ruby-lang
fujimura has quit [Ping timeout: 240 seconds]
chinmay_dd is now known as randomDude
randomDude is now known as chinmay_dd
banister has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
forgottenleaf has joined #ruby-lang
shazaum has joined #ruby-lang
<womble> TvL2386: Give this a whirl, see if it makes sense: https://gist.github.com/mpalmer/59c33fd1a2cef2181003
sepp2k has quit [Quit: Leaving.]
alestuber has joined #ruby-lang
<TvL2386> womble, thanks! I'm gonna read it!
<TvL2386> That class Foo's initialize method looks indeed a lot like mine :-)
<womble> What can I say, I have the powers of mind-reading.
GBrawl has quit [Quit: (null)]
<TvL2386> womble, I love it!
<womble> TvL2386: Sweet. Glad it makes sense.
<TvL2386> I'm not exactly keen on having to specify which interface to use, I'd like it to be "under the hood", but it makes testing much better
joaomdmoura has joined #ruby-lang
<womble> TvL2386: You mean you would expect your Foo class to be able to connect to a number of different backends depending on what the Foo is doing?
<TvL2386> womble, oh no... there's only one
<TvL2386> womble, as an alternative:
<TvL2386> womble, would it be an idea to create an :interface= method on Foo to override it when you want (during testing)
bougyman has joined #ruby-lang
<womble> You *could*, but I'm not a fan of creating methods that are *only* useful for testing.
<womble> It tends to result in all sorts of ugly side-effects, because if you provide a method for it, *someone* (even if it's just future you) will decide that's the answer to their problem, and all kinds of hell can break loose.
<TvL2386> hmmmmzzzzzz.... I wanted to say the same about the :initialize argument you created, but it's not true
<TvL2386> womble, ha lol :-)
joaomdmoura has quit [Ping timeout: 244 seconds]
<TvL2386> ok ok...
<TvL2386> womble, thanks for taking the time to show me this!
benlovell has joined #ruby-lang
tomaz_b has quit [Ping timeout: 264 seconds]
<TvL2386> womble, another question, when you do it like you say, I'm thinking of defining a StubInterface class in my test file that has all the methods and internals required to test what's being passed. Does that sound like the right thing to do?
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
benlovell has joined #ruby-lang
Iskarlar has joined #ruby-lang
malconis has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
<womble> TvL2386: I'd just use regular mock/stub/spy objects, but perhaps minitest's mocks aren't as powerful and you need extra support.
Forgetful_Lion has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
sankaber has joined #ruby-lang
b_hoffman has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sankaber has quit [Read error: Connection reset by peer]
sankaber has joined #ruby-lang
hahuang61 has joined #ruby-lang
yalue has joined #ruby-lang
chinmay_dd has joined #ruby-lang
chinmay_dd has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 252 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chinmay_dd has joined #ruby-lang
lektrik has joined #ruby-lang
hinbody has joined #ruby-lang
atomical has joined #ruby-lang
atomical has quit [Client Quit]
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
atomical has joined #ruby-lang
forgottenleaf has quit [Max SendQ exceeded]
chinmay_dd has quit []
banister has joined #ruby-lang
ta has quit [Remote host closed the connection]
enebo has joined #ruby-lang
lektrik has left #ruby-lang ["Leaving"]
revath has quit [Read error: No route to host]
revath has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
joaomdmoura has joined #ruby-lang
sgambino has joined #ruby-lang
Guest14567 is now known as gmci
|jemc| has joined #ruby-lang
chouhoulis has joined #ruby-lang
acqant has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby-lang
alestuber has quit [Ping timeout: 272 seconds]
imperator has joined #ruby-lang
[k- has joined #ruby-lang
symm- has joined #ruby-lang
alestuber has joined #ruby-lang
k3asd` has joined #ruby-lang
hahuang61 has joined #ruby-lang
myork80 has joined #ruby-lang
sandelius has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
hahuang61 has quit [Ping timeout: 244 seconds]
fu2ristiq has joined #ruby-lang
gambl0re has quit [Ping timeout: 255 seconds]
<fu2ristiq> hi everyone
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fu2ristiq has quit [Client Quit]
workmad3 has joined #ruby-lang
myork80 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
<imperator> good morning
Ilyes512 has joined #ruby-lang
<apeiros> moin imperator
Ilyes512 has quit [Read error: Connection reset by peer]
Ilyes512_ has joined #ruby-lang
JEG2 has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davispuh has joined #ruby-lang
Iskarlar has joined #ruby-lang
jas02 has quit [Quit: jas02]
ascarter has joined #ruby-lang
mcclurmc has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
jas02 has joined #ruby-lang
Petruchio has joined #ruby-lang
chadwtaylor has joined #ruby-lang
joaomdmoura has joined #ruby-lang
<Petruchio> Hi. Can I combine named keyword arguments, using the nice 2.1 syntax, with ad-hoc keyword arguments? I.e, something like: def initialize(x: 2, y: 3, *other_named_arguments) # which doesn't work
<jhass> Petruchio: yes, use a second star, **kwargs
<Petruchio> Ah, great. Thanks.
joaomdmoura has quit [Remote host closed the connection]
atomical has quit [Read error: Connection reset by peer]
<Petruchio> Cool! This makes me very happy. :-)
nedp has quit [Remote host closed the connection]
atomical has joined #ruby-lang
<Petruchio> My code just got simpler. Ciao.
Petruchio has left #ruby-lang [#ruby-lang]
j4cknewt has joined #ruby-lang
joaomdmoura has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
riotjones has quit [Remote host closed the connection]
bantic has joined #ruby-lang
postmodern has joined #ruby-lang
drew1 has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gamename has quit [Remote host closed the connection]
bougyman has quit [Quit: leaving]
StevenNunez has joined #ruby-lang
jas02 has quit [Quit: jas02]
jas02 has joined #ruby-lang
skade has joined #ruby-lang
bougyman_ has joined #ruby-lang
gambl0re has joined #ruby-lang
revath has quit [Ping timeout: 276 seconds]
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
bougyman_ is now known as bougyman
ta has joined #ruby-lang
j4cknewt_ has joined #ruby-lang
hahuang61 has joined #ruby-lang
j4cknewt_ has quit [Client Quit]
drewo has joined #ruby-lang
drewo has quit [Client Quit]
j4cknewt has quit [Ping timeout: 265 seconds]
alestuber has quit [Remote host closed the connection]
davispuh has quit [Read error: Connection reset by peer]
davispuhh has joined #ruby-lang
drewo has joined #ruby-lang
Ilyes512_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby-lang
hahuang61 has quit [Ping timeout: 258 seconds]
drewo has quit [Client Quit]
rindolf has joined #ruby-lang
drewo has joined #ruby-lang
drewo has quit [Client Quit]
acqant has quit [Ping timeout: 246 seconds]
drewo has joined #ruby-lang
pyo_ has quit []
acqant has joined #ruby-lang
alestuber has joined #ruby-lang
konsolebox has joined #ruby-lang
lapide_viridi has joined #ruby-lang
ArchRogem has quit [Ping timeout: 252 seconds]
micmus has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gamename has joined #ruby-lang
yfeldblum has joined #ruby-lang
gamename has quit [Remote host closed the connection]
palacz has joined #ruby-lang
gamename has joined #ruby-lang
<palacz> can anyone point me in the right direction? jruby-1.7.20; jre 1.7 u80, I'm getting error when making https request using net/http
<palacz> OpenSSL::SSL::SSLError: handshake alert: unrecognized_name from org/jruby/ext/openssl/SSLSocket.java:190:in `connect'
<palacz> same code works fine using regular ruby
ItSANgo_ has joined #ruby-lang
ItSANgo__ has quit [Ping timeout: 245 seconds]
davispuhh has quit [Read error: Connection reset by peer]
davispuh has joined #ruby-lang
jas02 has quit [Quit: jas02]
rcvalle has joined #ruby-lang
<headius> palacz: stop into #jruby with that question
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
revath has joined #ruby-lang
<palacz> thanks headius
dhjondoh has quit [Remote host closed the connection]
gamename has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
gamename has joined #ruby-lang
alestuber has quit [Ping timeout: 246 seconds]
allomov has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
ascarter has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 264 seconds]
riotjones has quit [Ping timeout: 246 seconds]
banister has joined #ruby-lang
symm- has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
arooni-mobile has joined #ruby-lang
stef204 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 264 seconds]
caseypatrickdris has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
palacz has quit [Quit: Page closed]
VinnyBoy has joined #ruby-lang
Ilyes512 has joined #ruby-lang
Ilyes512 has quit [Client Quit]
sandelius has joined #ruby-lang
stan has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby-lang
fusillicode has quit [Ping timeout: 258 seconds]
chouhoulis has joined #ruby-lang
zendrix has joined #ruby-lang
BanzaiJoe has joined #ruby-lang
lnr has quit [Max SendQ exceeded]
skade has quit [Quit: Computer has gone to sleep.]
allomov has joined #ruby-lang
bb010g has quit [Quit: Connection closed for inactivity]
revath has quit [Ping timeout: 252 seconds]
StevenNunez has quit [Remote host closed the connection]
rindolf has quit [Quit: Leaving]
rindolf has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
zendrix has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
mikecmpbll has quit [Ping timeout: 265 seconds]
b_hoffman has quit [Quit: b_hoffman]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
b_hoffman has joined #ruby-lang
callumacrae is now known as nub
arooni-mobile has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
revath has joined #ruby-lang
[k- has quit [Remote host closed the connection]
Pathfinder has joined #ruby-lang
<imperator> anyone else here using rbenv? i'm not seeing jruby 9k pre2 available for some reason
hahuang61 has joined #ruby-lang
<imperator> did a git pull in .rbenv, seems up to date
rikkipitt has joined #ruby-lang
benlovell has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby-lang
<imperator> nm, found it, had to update the ruby-build plugin
hahuang61 has quit [Ping timeout: 258 seconds]
Voker57 has joined #ruby-lang
arooni-mobile has joined #ruby-lang
fusillicode has joined #ruby-lang
alestuber has joined #ruby-lang
revath has quit [Ping timeout: 258 seconds]
k3asd` has quit [Remote host closed the connection]
solars has joined #ruby-lang
allomov has quit [Ping timeout: 240 seconds]
jgpawletko has joined #ruby-lang
k3asd` has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
allomov has joined #ruby-lang
stamina has quit [Quit: WeeChat 1.2]
rikkipitt has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby-lang
zendrix has joined #ruby-lang
k3asd` has quit [Ping timeout: 276 seconds]
k3asd` has joined #ruby-lang
tibig has joined #ruby-lang
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
tenderlove has joined #ruby-lang
sandelius has joined #ruby-lang
revath has joined #ruby-lang
Pathfinder has quit [Ping timeout: 250 seconds]
b_hoffman has quit [Quit: b_hoffman]
joaomdmoura has joined #ruby-lang
benlovell has joined #ruby-lang
Pathfinder has joined #ruby-lang
sarkyniin has joined #ruby-lang
danguita has left #ruby-lang ["Ciao! (WeeChat 0.4.2)"]
thebastl has joined #ruby-lang
bertocode has joined #ruby-lang
lele_ is now known as Guest24
drbrain changed the topic of #ruby-lang to: will redirect to #ruby the morning of June 1, Pacific Time
<darix> ohnoes
drbrain changed the topic of #ruby-lang to: this channel will redirect to #ruby the morning of June 1, Pacific Time
<darix> drbrain: some time would be nice
<darix> otherwise pacific time is an useless qualifier :)
<drbrain> well, it depends on when I get up and what I'm doing on June 1
<drbrain> "morning of" is as specific as I can get since people might surprise me with a meeting
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
revath has quit [Quit: Leaving.]
revath has joined #ruby-lang
|jemc| has left #ruby-lang ["WeeChat 1.1.1"]
mikecmpbll has joined #ruby-lang
solars has quit [Ping timeout: 250 seconds]
<rindolf> drbrain: so I should just /join #ruby from now?
<drbrain> rindolf: yes
<rindolf> drbrain: OK, thanks.
hahuang61 has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 246 seconds]
alestube_ has joined #ruby-lang
alestuber has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 244 seconds]
intinig has quit [Remote host closed the connection]
redbullion has joined #ruby-lang
<redbullion> has anyone seen a good CONCISE guide which covers the differences between methods and procs?
<redbullion> procs and lambdas are objects I gather;
djbkd has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
alestube_ has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
<drbrain> methods are objects too
<drbrain> they're just harder to get to
<drbrain> method & lambda check arguments, procs do not
<redbullion> tks @drbrain ; is there a guide beyond the ruby org website that you've found useful?
<drbrain> lambda and procs can be anonymous, methods have name
<drbrain> s
<drbrain> redbullion: ↑ is about as concise as it gets
<redbullion> tks
<drbrain> someone else might have a website handy
duderonomy has quit [Ping timeout: 276 seconds]
sandelius has joined #ruby-lang
baweaver has joined #ruby-lang
riotjones has joined #ruby-lang
djellemah has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
arBmind has joined #ruby-lang
arooni-mobile has quit [Quit: Leaving]
riotjones has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby-lang
k3asd` has quit [Ping timeout: 246 seconds]
baweaver has quit [Remote host closed the connection]
zendrix has quit [Remote host closed the connection]
rikkipitt has joined #ruby-lang
baweaver has joined #ruby-lang
fusillicode has quit [Ping timeout: 246 seconds]
alestuber has joined #ruby-lang
b_hoffman has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
alestuber has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby-lang
Pathfinder has quit [Ping timeout: 272 seconds]
rikkipitt has quit [Quit: Leaving...]
leandrosnunes has joined #ruby-lang
leandrosnunes has quit [Client Quit]
alestuber has joined #ruby-lang
duderonomy has joined #ruby-lang
zendrix has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
hahuang61 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
chinmay_dd has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
hahuang61 has quit [Ping timeout: 256 seconds]
symm- has joined #ruby-lang
skade has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
bb010g has joined #ruby-lang
Iskarlar has joined #ruby-lang
shazaum has quit [Quit: This computer has gone to sleep]
egypt has joined #ruby-lang
benlovell has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
davispuh has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
elia has joined #ruby-lang
banister has quit [Ping timeout: 256 seconds]
jo__ has joined #ruby-lang
zendrix has joined #ruby-lang
GBrawl has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
konsolebox has quit [Quit: Leaving]
LBo has joined #ruby-lang
thebastl has quit [Read error: Connection reset by peer]
thebastl has joined #ruby-lang
chadwtaylor has quit [Quit: Leaving...]
SpeakerToMeat is now known as teck932
arooni-mobile has joined #ruby-lang
teck932 is now known as SpeakerToMeat
elia has joined #ruby-lang
banister has joined #ruby-lang
shazaum has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lapide_viridi has quit [Quit: Leaving]
zendrix has quit [Remote host closed the connection]
ruby-lang091 has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
ruby-lang091 has quit [Client Quit]
hahuang61 has joined #ruby-lang
zendrix has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
thebastl has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
redbullion has quit [Quit: Leaving]
pragmatism has joined #ruby-lang
<ljarvis> :)
chinmay_dd has quit []
arooni-mobile has quit [Ping timeout: 265 seconds]
irb1 has joined #ruby-lang
<irb1> hello all!
baweaver has joined #ruby-lang
thebastl has quit [Quit: Leaving...]
<jhass> hi
skade has quit [Quit: Computer has gone to sleep.]
banister has quit [Read error: No route to host]
<BanzaiJoe> 'ello
skade has joined #ruby-lang
nwhirschfeld has quit [Remote host closed the connection]
nwhirschfeld has joined #ruby-lang
<havenwood> hi
nwhirschfeld has quit [Remote host closed the connection]
sandelius has joined #ruby-lang
revath has quit [Ping timeout: 252 seconds]
nwhirschfeld has joined #ruby-lang
b_hoffman has joined #ruby-lang
solars has joined #ruby-lang
GBrawl has quit [Quit: (null)]
atomical_ has joined #ruby-lang
atomical has quit [Read error: Connection reset by peer]
shazaum has quit [Quit: This computer has gone to sleep]
<apeiros> oy
revath has joined #ruby-lang
<irb1> hi, i need some help with a time format issue and could use your assistance
<jhass> just ask
solars has quit [Ping timeout: 250 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<irb1> basically i think it is more of a Rails issue but perhaps you guys can assist. i have a time value 2015-05-19T02:27:48:526-0400
<irb1> when this is stored by ActiveRecord it is converted into 2015-05-19 02:27:48 UTC
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<irb1> what is the best way to maintain the correct time offset for the record?
<jhass> you need to remember the offset of input data and can't determine the offset you need to output with via any other mean?
tomaz_b has joined #ruby-lang
<irb1> the problem is that the offset is stripped and just stored in UTC when in reality the value should be adjusted for the -0400 THEN stored as UTC
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> how do you parse it?
<irb1> i am not doing any specific parsing so I am just getting the raw string value then store it into the database
baweaver has quit [Remote host closed the connection]
yalue has quit [Read error: Connection reset by peer]
_ht has quit [Quit: Konversation terminated!]
gambl0re has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby-lang
znz_jp has quit [Ping timeout: 265 seconds]
rindolf has quit [Quit: Leaving]
bruno- has joined #ruby-lang
<jhass> that's probably the issue then, let me try to figure out the format string for you
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
znz_jp has joined #ruby-lang
<jhass> >> require "datetime"; DateTime.strptime("2015-05-19T02:27:48-0400", "%Y-%m-%dT%T:%3N%z") # it won't parse the milliseconds :/
<eval-in> jhass => cannot load such file -- datetime (LoadError) ... (https://eval.in/370647)
<jhass> >> require "time"; DateTime.strptime("2015-05-19T02:27:48-0400", "%Y-%m-%dT%T:%3N%z") # it won't parse the milliseconds :/
<eval-in> jhass => invalid date (ArgumentError) ... (https://eval.in/370648)
<jhass> eh, when I include them too
banister has joined #ruby-lang
<jhass> >> require "time"; DateTime.strptime("2015-05-19T02:27:48:526-0400", "%Y-%m-%dT%T:%N%z") # irb1 seems to work
<eval-in> jhass => #<DateTime: 2015-05-19T02:27:48-04:00 ((2457162j,23268s,526000000n),-14400s,2299161j)> (https://eval.in/370658)
<jhass> if you assign that, it should properly convert
<apeiros> iso8601 should work too
<apeiros> >> require "time"; DateTime.iso8601("2015-05-19T02:27:48:526-0400")
<eval-in> apeiros => invalid date (ArgumentError) ... (https://eval.in/370660)
<apeiros> :-O
<jhass> oh, I never realized there's one that parses
<apeiros> oh, : instead of .
<apeiros> >> require "time"; DateTime.iso8601("2015-05-19T02:27:48.526-0400")
GPrime has joined #ruby-lang
<eval-in> apeiros => #<DateTime: 2015-05-19T02:27:48-04:00 ((2457162j,23268s,526000000n),-14400s,2299161j)> (https://eval.in/370661)
<jhass> yeah, it's odd
<jhass> any idea why %3N doesn't work but %N does? docs seem to state otherwise
<apeiros> yeah, if it's really : instead of . (which fits no spec I know of), then strptime.
<apeiros> you only need with with strftime
<apeiros> strptime doesn't care
<apeiros> *width
<apeiros> stumbled over that myself
<jhass> well, it does care as in that the width versions don't work
<jhass> it's weird that the docs mention them anyway, probably copy paste
<apeiros> yeah, because it doesn't recognize them because %N matches all widths :)
<apeiros> probably
alestuber has quit [Ping timeout: 258 seconds]
arooni-mobile has joined #ruby-lang
<BanzaiJoe> is there a method that random slices in Ruby e.g. 0..1000, take 6 slices such that the sum of the slices is 1000?
<apeiros> funny, you're not the first to ask BanzaiJoe. is that a riddle somewhere?
tak1n has quit [Ping timeout: 250 seconds]
<jhass> I bet
tak1n has joined #ruby-lang
<apeiros> BanzaiJoe: and no, such a method does not exist. you have to code it yourself.
<jhass> if it doesn't need to be super good distributed, the common approach is to take 5 slices up to 1000/6 and fill up with the 6th
<BanzaiJoe> maybe... I was trying to distribute something into X number of boxes and I can imagine a bunch of pita ways
GPrime has quit [Read error: Connection reset by peer]
<BanzaiJoe> was hoping for something simple
<irb1> let me give that a shot
<BanzaiJoe> jhass take 5 slices up to 1000?
GPrime has joined #ruby-lang
<jhass> up to 1000/6
<BanzaiJoe> uhhh... how exactly does one take (n-1) slices from 1000/n in Ruby?
<BanzaiJoe> or X/n
<BanzaiJoe> I can think of how to do it in long form, just wondering if there is a simple way
benlovell has quit [Ping timeout: 272 seconds]
<apeiros> hey yorickpeterse, something for you: https://twitter.com/ag_dubs/status/603273801783234560 :D
tomaz_b has quit [Ping timeout: 246 seconds]
joaomdmoura has quit [Remote host closed the connection]
<jhass> BanzaiJoe: well, what do you mean by slices actually? items of a 1000 element array? ranges from x..y? something else?
elia has joined #ruby-lang
hagabaka has quit [Ping timeout: 276 seconds]
b_hoffman has quit [Quit: b_hoffman]
joaomdmoura has joined #ruby-lang
<BanzaiJoe> given X, x1 to xn sum to X where x1..xn are randomly chosen. So [14, 86, 100, 300, 250, 150, 80, 20]
<BanzaiJoe> obviously not random
<jhass> uh, sounds like homework :P
<BanzaiJoe> and the "distribution" just happened to be made up too
<BanzaiJoe> my first project... thinking maybe I bit off more than I can chew ;)
fusillicode has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
<jhass> ah, so just N numbers that sum to 1000
djbkd has quit [Remote host closed the connection]
alestuber has joined #ruby-lang
<irb1> apeiros: so i tried your solution but it doesn’t return the value in UTC
<apeiros> irb1: .utc
<BanzaiJoe> jhass yes
<jhass> >> X=1000; N=6; series = Array.new(N-1) { rand(X/N) }; series << X-series.inject(:+); [series, series.inject(:+) == X]
<eval-in> jhass => [[109, 160, 163, 116, 113, 339], true] (https://eval.in/370731)
<jhass> as said, won't yield a good distribution
<BanzaiJoe> I think....
<BanzaiJoe> I like it. well enough is good enough. Thank you!
<ljarvis> definitely homework
<BanzaiJoe> it's single player object moving game
<ljarvis> my homework was never that interesting
<BanzaiJoe> :)
hahuang65 has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
<irb1> apeiros: this looks to work as well
<irb1> require "time"; DateTime.strptime("2015-05-19T02:27:48:526-0400", "%Y-%m-%dT%T:%N%z").new_offset(-4)
<BanzaiJoe> given a container, the player can either convert resources to storage or store the resources, there's more flair and names and idea but that's fundamental start
<irb1> actually this is better: require "time"; DateTime.strptime("2015-05-19T02:27:48:526-0400", "%Y-%m-%dT%T:%N%z").to_time.utc
<BanzaiJoe> for now, objective is to end up with most resources
<apeiros> interesting. DateTime has no #utc
<apeiros> only Time
<jhass> apeiros: rails
<apeiros> oh ruby and your inconsistencies :-(
<jhass> irb1: did you try assigning the DateTime unchanged? %z parses the zone and AR should convert to utc
<irb1> jhass: i did not
<irb1> can you provide a quick code sample
<jhass> you did foo.something_at = some_string, now do foo.something_at = DateTime.parse(...)#nothing more here
djbkd has joined #ruby-lang
joaomdmoura has joined #ruby-lang
gianlucadv has quit [Ping timeout: 264 seconds]
<irb1> thank you all for your help!
jgpawletko has quit [Quit: jgpawletko]
baweaver has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
irb1 has quit [Quit: irb1]
Petruchio has joined #ruby-lang
workmad3 has joined #ruby-lang
<Petruchio> Is there a standard way to get the key names from a format string? If, for instance, I have "The %{animal} says %{sound}", I would want animal and sound.
<Petruchio> :animal, :sound or 'animal', 'sound'... whatever.
<Petruchio> Short, of course, of parsing the string myself.
<jhass> would surprise me
<jhass> especially since it's a simple .scan away
caseypatrickdris has quit [Remote host closed the connection]
<apeiros> Petruchio: scan(/%\{\w+\}/) should do the job
hinbody has quit [Quit: leaving]
<jhass> [^}]+
<jhass> actually I have no idea about the rules for %{..} :P
<ljarvis> good old fasioned pedantry
<apeiros> jhass: valid identifier I'd guess
<apeiros> given that it needs to be a valid symbol without quotes
<Petruchio> Thanks. Yeah, that wil certainly do it. I was wondering whether there was an "official" way.
elia has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<Petruchio> Could run afoul of escaping oddities, I suppose.
skade has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
jgpawletko has joined #ruby-lang
jgpawletko has quit [Client Quit]
micmus has quit [Ping timeout: 265 seconds]
imperator has quit [Quit: Leaving]
wallerdev has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
b_hoffman has joined #ruby-lang
marr has joined #ruby-lang
bungoman has joined #ruby-lang
zendrix has quit [Remote host closed the connection]
malconis has quit [Ping timeout: 240 seconds]
<BanzaiJoe> please, please someone inject 6 months of Ruby knowledge in my brain so I can escape this hellhole of a job
zendrix has joined #ruby-lang
* BanzaiJoe draws target on head
<BanzaiJoe> gun or knowledge, either will work
joaomdmoura has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
micmus has joined #ruby-lang
baweaver has joined #ruby-lang
arooni-mobile has quit [Remote host closed the connection]
<jhass> I only have wine at hand...
<jhass> it's red too at least
gambl0re has quit [Ping timeout: 272 seconds]
gamename has quit [Remote host closed the connection]
gamename has joined #ruby-lang
<BanzaiJoe> couple of glasses to start then when I've got lower reflexes...
<BanzaiJoe> seriously, things aren't that bad, I'm able to do labs and tutorials while getting paid
gamename has quit [Ping timeout: 258 seconds]
momomomomo has quit [Ping timeout: 256 seconds]
joaomdmoura has joined #ruby-lang
momomomomo has joined #ruby-lang
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has joined #ruby-lang
sarkyniin has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
skade has joined #ruby-lang
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
znz_jp has quit [Ping timeout: 265 seconds]
malconis has joined #ruby-lang
bungoman_ has joined #ruby-lang
ttilley has quit [Quit: Leaving...]
hahuang65 has joined #ruby-lang
bungoman has quit [Ping timeout: 255 seconds]
hahuang65 has quit [Client Quit]
bungoman_ has quit [Ping timeout: 255 seconds]
joaomdmoura has quit [Remote host closed the connection]
cubicme has joined #ruby-lang
hahuang65 has joined #ruby-lang
joaomdmoura has joined #ruby-lang
malconis has quit [Ping timeout: 265 seconds]
scottschecter has quit [Quit: Leaving]
caseypatrickdris has joined #ruby-lang
joaomdmoura has quit [Ping timeout: 256 seconds]
caseypatrickdris has quit [Ping timeout: 265 seconds]
drew1 has quit [Quit: WeeChat 0.4.2]
workmad3 has quit [Ping timeout: 272 seconds]
momomomomo_ has joined #ruby-lang
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby-lang
postmodern has quit [Quit: Leaving]
tibig has quit [Ping timeout: 276 seconds]
DLSteve has quit [Quit: Leaving]
Ropeney has joined #ruby-lang
caseypatrickdris has joined #ruby-lang
benlovell has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
caseypatrickdris has quit [Ping timeout: 256 seconds]
joaomdmoura has joined #ruby-lang
benlovell has quit [Ping timeout: 246 seconds]
zendrix has quit [Remote host closed the connection]
zendrix has joined #ruby-lang
baweaver has joined #ruby-lang
kith_ has joined #ruby-lang
centrx has joined #ruby-lang
kith has quit [Disconnected by services]
kith_ is now known as kith
skade has quit [Quit: Computer has gone to sleep.]
mahmoudmahfouz has joined #ruby-lang
mahmoudmahfouz has quit [Max SendQ exceeded]
k3asd` has quit [Ping timeout: 255 seconds]
JEG2 has quit [Quit: Connection closed for inactivity]
momomomomo has quit [Quit: momomomomo]
drewo has quit [Quit: WeeChat 1.1.1]
jo__ has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
whippythellama has quit [Quit: whippythellama]
b_hoffman has quit [Quit: b_hoffman]
mikecmpb_ has joined #ruby-lang
mikecmpb_ has quit [Client Quit]
mikecmpbll has quit [Ping timeout: 258 seconds]
BanzaiJoe has quit [Ping timeout: 240 seconds]