s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Madplatypus has joined #ruby
karapetyan has quit [Remote host closed the connection]
SnowboardTechie has joined #ruby
aghalarp has joined #ruby
karapetyan has joined #ruby
SilverKey has quit [Quit: Halted.]
Rodya_ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
the_rhizo has joined #ruby
SilverKey has joined #ruby
rajdesai has quit [Remote host closed the connection]
Salve has quit []
the_rhizo has quit [Ping timeout: 244 seconds]
Dimik has quit [Ping timeout: 244 seconds]
rajdesai has joined #ruby
<r_rios>
Hello, all. I'm chaining a select operation with a map operation and I want a variable I defined in the select block to be passed to the map block. Is that somehow possible?
A_Drone has joined #ruby
JeanCarloMachado has joined #ruby
A_Drone has quit [Remote host closed the connection]
sumobob has joined #ruby
ruby[bot] has joined #ruby
rajdesai has quit [Remote host closed the connection]
A_Drone has joined #ruby
pawnbox has joined #ruby
AzureStigma has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vingador has quit [Remote host closed the connection]
nando293921 has joined #ruby
shmuli has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
A_Drone has quit [Remote host closed the connection]
kyleolivo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rajdesai has joined #ruby
caustic has joined #ruby
patche_ has joined #ruby
nando293921 has quit [Ping timeout: 258 seconds]
shmuli has quit [Remote host closed the connection]
rajdesai has quit [Ping timeout: 244 seconds]
Torrone has quit [Quit: This computer has gone to sleep]
spudowiar has quit [Quit: Leaving.]
vinleod has joined #ruby
vdamewood has quit [Ping timeout: 244 seconds]
vinleod is now known as vdamewood
shmuli has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
byteflame has quit [Ping timeout: 260 seconds]
plugine has joined #ruby
TheWhip has joined #ruby
RegulationD has joined #ruby
plugine has quit [Remote host closed the connection]
shmuli has quit [Remote host closed the connection]
plugine has joined #ruby
plugine has quit [Client Quit]
shinnya has joined #ruby
zarubin has joined #ruby
TheWhip has quit [Ping timeout: 260 seconds]
craysiii has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zarubin has quit [Ping timeout: 244 seconds]
sumobob has quit [Ping timeout: 250 seconds]
Ropeney has joined #ruby
marloi has quit [Ping timeout: 264 seconds]
swills__ has joined #ruby
swills has quit [Ping timeout: 244 seconds]
swills_ has quit [Ping timeout: 250 seconds]
LoneHermit has joined #ruby
Dimik-- has joined #ruby
SnowboardTechie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
ryan_notabot has quit [Ping timeout: 258 seconds]
<nofxx>
jhack, haha ruby got into a series?
jgt3 has joined #ruby
SteenJobs has joined #ruby
rajdesai has quit [Ping timeout: 250 seconds]
aibot_ has quit [Ping timeout: 265 seconds]
diegoviola has quit [Quit: WeeChat 1.5]
beilabs has joined #ruby
<nofxx>
mr robot got the same feeling as independence day and star wars for me: get a good story, f* it with teens and racial quotas, getting all the hope that good films will be made again and put it in the trash
Helheim has joined #ruby
pawnbox has joined #ruby
etetz has joined #ruby
karapetyan has quit [Remote host closed the connection]
jgt3 has quit [Ping timeout: 252 seconds]
ThinTim has joined #ruby
LoneHermit has joined #ruby
Mrgoose2 has joined #ruby
<Mrgoose2>
bundler: failed to load command: rackup , any idea why i would get that
aibot_ has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
etetz has quit [Ping timeout: 264 seconds]
etetz has joined #ruby
pokalyis has joined #ruby
xall has quit [Ping timeout: 276 seconds]
LoneHermit has quit [Ping timeout: 265 seconds]
TheWhip has joined #ruby
etetz has quit [Ping timeout: 244 seconds]
Spami has joined #ruby
etetz has joined #ruby
xall has joined #ruby
pawnbox has quit [Remote host closed the connection]
paradisaeidae_ has joined #ruby
pawnbox has joined #ruby
shmuli has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
TheWhip has quit [Remote host closed the connection]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
etetz has quit [Ping timeout: 252 seconds]
pokalyis has joined #ruby
gix has quit [Ping timeout: 240 seconds]
rkazak has quit [Quit: Sleep.....ing....]
gix has joined #ruby
dionysus69 has joined #ruby
roflmyeggo has quit [Ping timeout: 260 seconds]
macsteps_ has quit []
rkazak has joined #ruby
iLogic has quit [Ping timeout: 240 seconds]
macsteps has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
craigp has quit [Ping timeout: 240 seconds]
xue has joined #ruby
xue has quit [Max SendQ exceeded]
xue has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SteenJobs has quit [Quit: SteenJobs]
pokalyis has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
polysics has joined #ruby
djellemah has joined #ruby
Chris3y_RubyNewb has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
<postmodern>
what is a good minimum ruby version to require these days for a gem?
<postmodern>
1.9.3 is no longer maintained, so maybe >= 2.0.0?
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has quit [Quit: Sleep.....ing....]
grenierm has joined #ruby
<Nilium>
What version do you use normally?
xue has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
<postmodern>
Nilium, was previously >= 1.9.3 to exclude 1.8 and the awkward 1.9.1 and 1.9.2 releases
<postmodern>
which contained various bugs we shall not speak of
xue has joined #ruby
sarbs has quit [Max SendQ exceeded]
sarbs has joined #ruby
<postmodern>
this is for the spidr gem btw
rajdesai has joined #ruby
s2013 has joined #ruby
rajdesai has quit [Read error: Connection reset by peer]
rajdesai has joined #ruby
s2013 has quit [Client Quit]
enterprisey has joined #ruby
jishankai has joined #ruby
jgt3 has joined #ruby
TheWhip has joined #ruby
yfeldblum has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pawnbox has quit [Remote host closed the connection]
hahuang61 has joined #ruby
tmtwd has quit [Ping timeout: 276 seconds]
jgt3 has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
xlegoman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aleskandro has quit [Remote host closed the connection]
iMadper has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
amclain has quit [Quit: Leaving]
spongebonghemppa has quit [Quit: Page closed]
dminuoso has joined #ruby
pawnbox has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
Velizar has quit [Ping timeout: 258 seconds]
johnny56 has joined #ruby
hipertracker has joined #ruby
macsteps has quit [Remote host closed the connection]
Spami has joined #ruby
alfiemax has joined #ruby
SilverKey has quit [Quit: Cheerio!]
Velizar has joined #ruby
Cohedrin has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
s2013 has joined #ruby
SilverKey has joined #ruby
postmodern has quit [Ping timeout: 250 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ThinTim has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patche has joined #ruby
pokalyis has joined #ruby
patche has quit [Client Quit]
patche_ is now known as patche
craigp has joined #ruby
rajdesai_ has joined #ruby
threadNecromance has joined #ruby
rajdesai_ has quit [Remote host closed the connection]
rajdesai has quit [Read error: Connection reset by peer]
rajdesai has joined #ruby
iMadper` has joined #ruby
M-mistake has quit [Read error: Connection reset by peer]
M-shine has quit [Read error: Connection reset by peer]
TheGillies has quit [Read error: Connection reset by peer]
M-manveru has quit [Write error: Connection reset by peer]
threadNecromance has quit [Client Quit]
threadNecromance has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
Spami has quit [Quit: This computer has gone to sleep]
TomyLobo has joined #ruby
iMadper has quit [Ping timeout: 276 seconds]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
postmodern has joined #ruby
jackjackdripper has joined #ruby
dminuoso has quit [Remote host closed the connection]
OTORelic has quit [Ping timeout: 258 seconds]
rajdesai has quit [Ping timeout: 240 seconds]
the_rhizo has joined #ruby
Spami has joined #ruby
rkazak has joined #ruby
shellie_ has quit [Ping timeout: 244 seconds]
A_Drone has joined #ruby
enterprisey has quit [Quit: Leaving]
chouhoulis has quit [Remote host closed the connection]
phrozen77 has joined #ruby
dminuoso has joined #ruby
M-shine has joined #ruby
anahtar has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
ThinTim has joined #ruby
shellie_ has joined #ruby
pokalyis has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
jgt3 has joined #ruby
TPug has joined #ruby
postmodern has quit [Quit: Leaving]
Sucks has joined #ruby
A_Drone has quit [Remote host closed the connection]
duckpuppy has joined #ruby
Sucks has quit [Max SendQ exceeded]
nadir has quit [Ping timeout: 250 seconds]
A_Drone has joined #ruby
jgt3 has quit [Ping timeout: 244 seconds]
LoneHerm_ has joined #ruby
astrobun_ has joined #ruby
l4v2 has quit [Quit: l4v2]
<anahtar>
Hello from Turkey :)
bocaneri has joined #ruby
Sucks has joined #ruby
Sucks has quit [Max SendQ exceeded]
nadir has joined #ruby
Sucks has joined #ruby
SnowboardTechie has joined #ruby
PoweredByPrana has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has quit [Ping timeout: 250 seconds]
pokalyis has joined #ruby
A_Drone has quit [Remote host closed the connection]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has quit [Remote host closed the connection]
A_Drone has joined #ruby
astrobun_ has joined #ruby
PoweredByPrana has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shmuli has joined #ruby
aupadhye has joined #ruby
giz|work|2 has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
macsteps has joined #ruby
threadNecromance has quit [Remote host closed the connection]
SnowboardTechie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
last_staff has joined #ruby
TheGillies has joined #ruby
Pupp3tm4st3r has joined #ruby
xlegoman has joined #ruby
bjh13 has quit [Quit: ERC (IRC client for Emacs 25.1.50.10)]
macsteps has quit [Ping timeout: 240 seconds]
A_Drone has quit [Read error: Connection reset by peer]
the_rhizo has quit [Ping timeout: 264 seconds]
A_Drone has joined #ruby
chouhoulis has joined #ruby
threadNecromance has joined #ruby
Sucks has quit [Remote host closed the connection]
RegulationD has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
Regulati_ has quit [Ping timeout: 244 seconds]
raeoks has joined #ruby
pokalyis has joined #ruby
s2013 has joined #ruby
ur5us has joined #ruby
tax has quit [Quit: Leaving]
aufi has joined #ruby
tax has joined #ruby
Rodya_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
OTORelic has joined #ruby
bad_ip has quit [Ping timeout: 260 seconds]
TheWhip has quit [Ping timeout: 258 seconds]
mim1k_ has quit [Quit: Reconnecting]
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
<dminuoso>
jhass: What about my first example though, why didn't work as expected?
<dminuoso>
Or doesn't class_eval change the default assignee for methods?
<dminuoso>
No nevermind, it's about the default receiver actually.
leea has joined #ruby
xall has quit [Ping timeout: 265 seconds]
<jhass>
class_eval does change the definee, yes, that's what makes it different from instance_eval in the first place, yes. Also yes, it doesn't matter for define_method, the receiver does. however there self is not the singleton class, it's the module instance (the instance of the singleton class)
<ule>
anahtar: thanks
OTORelic has quit [Ping timeout: 258 seconds]
<jhass>
so M.class_eval
djbkd has quit [Quit: My people need me...]
The_Phoenix1 has joined #ruby
<dminuoso>
jhass: Ah that makes perfect sense now.
The_Phoenix1 has quit [Max SendQ exceeded]
<dminuoso>
Thank you for explaining.
<jhass>
yw
aalmenar has joined #ruby
aalmenar has quit [Changing host]
aalmenar has joined #ruby
A_Drone has joined #ruby
The_Phoenix1 has joined #ruby
The_Phoenix1 has quit [Max SendQ exceeded]
c0mrad3 has joined #ruby
rodfersou has joined #ruby
The_Phoenix1 has joined #ruby
The_Phoenix1 has quit [Max SendQ exceeded]
The_Phoenix1 has joined #ruby
The_Phoenix1 has quit [Max SendQ exceeded]
TheWhip has joined #ruby
The_Phoenix1 has joined #ruby
max1 is now known as pickandmix
Spami has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<dminuoso>
jhass: It never occured to me that inside the context of a class self has different meanings "def self.foo" vs "self". :)
<dminuoso>
But I guess it makes sense.
tomphp has joined #ruby
hahuang61 has joined #ruby
jgt3 has joined #ruby
<jhass>
well, it doesn't? class A; a = self; def self.foo; b = self; end; end; here a and b are the same object
matp has quit [Remote host closed the connection]
matp_ has joined #ruby
<jhass>
while you expected it to a's singleton class in your first example
<jhass>
and def a.b is just syntax sugar for a.define_singleton_method(:b) if you so wish
pawnbox has quit [Remote host closed the connection]
grn has quit [Remote host closed the connection]
pawnbox has joined #ruby
pandaant has quit [Remote host closed the connection]
Torrone has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
skade has joined #ruby
rafadc has joined #ruby
etetz has joined #ruby
Torrone_1 has quit [Ping timeout: 244 seconds]
<fergal_>
hi guys, i’m trying to write an rspec test that calls a method with bogus data, and expects the method to raise a TypeError - does anyone have any resources on expecing loggers to receive errors?
The_Phoenix1 has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Quit: dionysus69]
xall has joined #ruby
ledestin has joined #ruby
The_Phoenix1 has joined #ruby
OTORelic has quit [Ping timeout: 258 seconds]
Torrone has quit [Client Quit]
Hyuk has joined #ruby
spudowiar has quit [Quit: Leaving.]
Azure has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
hanmac has joined #ruby
the_drow has joined #ruby
xall has quit [Ping timeout: 244 seconds]
JeanCarloMachado has joined #ruby
astrobun_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
babblebre has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
mim1k has quit [Ping timeout: 260 seconds]
last_staff has quit [Quit: last_staff]
mim1k has joined #ruby
last_staff has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
A_Drone has quit [Read error: Connection reset by peer]
xall has joined #ruby
blackgoat has joined #ruby
A_Drone has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xue has quit [Ping timeout: 258 seconds]
ruid has quit [Ping timeout: 264 seconds]
swills__ has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 264 seconds]
Dimik-- has joined #ruby
tyang has joined #ruby
mim1k has quit [Ping timeout: 244 seconds]
ferr has joined #ruby
airdisa has joined #ruby
Dimik-- has quit [Ping timeout: 250 seconds]
saneax is now known as saneax_AFK
tk__ has joined #ruby
<fergal_>
guys i’m testing a method that parses a hash and raises exceptions if there are formatting errors. is there a way to hard code malformed hashes in ruby? i’m currently doing something like `{:my_key” => {:other_key => value}}`, which when i run my app, fails with an excpected exception, but when i run my test, i am not getting the same exception, presumably because ruby is presumably cleaning up the values to form the hash?
bonhoeffer has joined #ruby
<bonhoeffer>
how do i define an instance method in the console -- if i've already defined a user and want @user.foo('hi') would that be: def User::foo(string)
<dminuoso>
bonhoeffer: You can simply reopen the User class.
<dminuoso>
class User; def foo; ...; end; end
skweek has quit [Ping timeout: 258 seconds]
<bonhoeffer>
yeah -- easy enough -- but i'm curious -- if you are in irb -- can you send to an existing class definition
<bonhoeffer>
you would be augmenting the user class
<dminuoso>
fergal_: Show us some code.
<dminuoso>
bonhoeffer: I just told you one variant. You can also use class_eval or send to access define_method
<dminuoso>
bonhoeffer: Im not sure what you want to do instead of augmentin.g
kobain has joined #ruby
<bonhoeffer>
thanks -- i'll look into those
<dminuoso>
bonhoeffer: Those are effectively the same thing, I am not sure what you mean by "can you send to an existing class definition"
<bonhoeffer>
what i would like to be able to do is test inside the console -- to define a method there and play with it
<bonhoeffer>
without reloading the console
Snowy has quit [Remote host closed the connection]
craigp_ has joined #ruby
<dminuoso>
14:12 < dminuoso> class User; def foo; ...; end; end
<dminuoso>
And that doesn't do this how?
openstruct has joined #ruby
<dminuoso>
bonhoeffer: "console" are you talking about rails?
<bonhoeffer>
dminuoso: it would
saneax_AFK is now known as saneax
<bonhoeffer>
i missed how i could use that
<dminuoso>
bonhoeffer: If so, you can use reload! to make source code chances visible to your rails console.
craigp has quit [Ping timeout: 252 seconds]
<bonhoeffer>
irb -- but could be rails console
<dminuoso>
bonhoeffer: (This is really useful in rails, as it lets you write code and interactively test code as you write it)
<rails>
AAAA
rails has left #ruby ["I thought what I'd do was, I'd pretend I was one of those deaf-mutes."]
<bonhoeffer>
yeah
<bonhoeffer>
i like that
the_drow has quit [Quit: This computer has gone to sleep]
glcx_ has joined #ruby
killerkamel has quit [Ping timeout: 244 seconds]
Snowy has joined #ruby
hahuang65 has joined #ruby
tyang has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 244 seconds]
macsteps has joined #ruby
blackgoat has quit [Ping timeout: 264 seconds]
face has joined #ruby
<fergal_>
dminuoso: it’s okay i got it sorted, just needed to use triple quotes, thanks!
hahuang65 has quit [Ping timeout: 258 seconds]
A_Drone has quit [Remote host closed the connection]
macsteps has quit [Ping timeout: 276 seconds]
<fergal_>
if i have `rescue TypeError` in my method, is it possible with rspec to test that the method raised and rescued a TypeError?
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
xybre has quit [Ping timeout: 258 seconds]
Didac has quit [Ping timeout: 258 seconds]
<dminuoso>
fergal_: Did you just ignore my previous comment?
<fergal_>
no?
tyang has joined #ruby
kavanagh has joined #ruby
kavanagh has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Didac has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
Nahra has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
<Mon_Ouie>
If the exception is rescued, callers can't know about it (except somehow through set_trace_func, but I'd advise against that). I'd recommend that you test for the side-effects of your exception handling code instead, whatever they may be.
bmurt has joined #ruby
jobat has joined #ruby
nofxx has joined #ruby
last_staff has quit [Quit: last_staff]
taverna_Kariolis has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
xall has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
A_Drone has joined #ruby
the_rhizo has joined #ruby
Snowy has quit [Quit: ragequit]
<taverna_Kariolis>
Can I just send a Job for processing immediately to the queue without having to execute a service like rake jobs etc. ? I am working with delayed job.
<taverna_Kariolis>
I cross posted this to #rubyonrails sorry
<dminuoso>
fergal_: You are testing multiple things. If you want to test behavior of your methods, mock the internal method to raise an exception and see test the handling of that. If you then want, you can test the internal method and expect { ..it.. }.to raise_error
duckpuppy has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
randomname has joined #ruby
IanMalcolm has joined #ruby
IanMalcolm has quit [Max SendQ exceeded]
Silthias1 has joined #ruby
kavanagh has joined #ruby
mikecmpbll has joined #ruby
Silthias has quit [Ping timeout: 244 seconds]
<randomname>
Hi, I'm iterating over a nested hash and want to print each key + its values. How can I prevent the key from being printed twice when its value is hash? Currently, this is my code: http://sprunge.us/aZfg
bmurt has quit [Ping timeout: 244 seconds]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Mon_Ouie>
you can imagine that *foo when foo is an array (or responds to #to_a) is like replacing foo with all its elements separated by commas. So push(*[1, 2, 3]) is the same as push(1, 2, 3) and push(*[1]) is the same as push(1).
<dminuoso>
snebel: Basically the splat is realized as an operator, ignorant about what its passed to.
marsjaninzmarsa has quit [Excess Flood]
tyang has quit [Ping timeout: 258 seconds]
craigp_ has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 258 seconds]
<snebel>
so it's kind of "expanding" the results and pass one by one to push..
<snebel>
so it does not fail right?
freerobby has joined #ruby
<dminuoso>
snebel: I think the most generic way of describing is: Take away the [] off the array, and interpret it this way
douglascorrea has quit []
biberu has quit [Ping timeout: 276 seconds]
<snebel>
sounds weird but start getting it
<snebel>
let's play a little bit more
<snebel>
with it
<snebel>
thanks!
tomphp has joined #ruby
<mikecmpbll>
can be used in other less intuitive ways too
<mikecmpbll>
>> a, b, *c, d = [1,2,3,4,5,6,7]; puts c
<Mon_Ouie>
(And the splat on the right hand side is not required)
s2013 has joined #ruby
axl_ has joined #ruby
LACampbell has quit [Ping timeout: 244 seconds]
jgt3 has quit [Ping timeout: 260 seconds]
<mikecmpbll>
oh yeah
Burgestrand has joined #ruby
agent_white has quit [Quit: brb]
aupadhye has joined #ruby
zacstewart has joined #ruby
hahuang65 has joined #ruby
jhack has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
spudowiar has joined #ruby
anisha has quit [Quit: Leaving]
speakingcode has joined #ruby
dionysus69 has joined #ruby
marsjaninzmarsa has joined #ruby
speakingcode has left #ruby [#ruby]
hutch34 has joined #ruby
solars has quit [Ping timeout: 258 seconds]
trinaldi has joined #ruby
marsjaninzmarsa has quit [Excess Flood]
bonhoeffer has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 250 seconds]
ChiefAlexander has quit [Remote host closed the connection]
agent_white has joined #ruby
<agent_white>
Mornin'
<trinaldi>
Hi, I have a HTML snippet with the code:<p class="cms-center"><b>content</b></p>. I'm using .scan to turn it to an array. How can I get that exactly content, including the tags? So far I'm getting only what's inside the <p> tag
<dminuoso>
trinaldi: Before I entertain the thought, do you maybe want an actual XML parser library like Nokogiri instead?
<trinaldi>
We are already using Prawn =/
ChiefAlexander has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias1 has quit [Read error: Connection reset by peer]
<trinaldi>
brb
jason____ has joined #ruby
chouhoulis has joined #ruby
braincrash has quit [Ping timeout: 244 seconds]
jason____ has quit [Client Quit]
braincrash has joined #ruby
jason____ has joined #ruby
jason____ is now known as rubyroo
marloi has joined #ruby
rubyroo is now known as rubyrubyroo
teclator has quit [Ping timeout: 264 seconds]
dminuoso has quit [Ping timeout: 240 seconds]
tyang has quit [Ping timeout: 258 seconds]
madsa has joined #ruby
rubyrubyroo has left #ruby [#ruby]
l4v2 has joined #ruby
Devalo has joined #ruby
hs366 has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 250 seconds]
GinoManWorks has quit [Read error: Connection reset by peer]
submitnine has quit []
Torrone has joined #ruby
xall has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
zacts has quit [Quit: WeeChat 1.4]
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duckpuppy has quit [Ping timeout: 250 seconds]
davidklsn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has joined #ruby
xall has quit [Ping timeout: 250 seconds]
teclator has joined #ruby
dminuoso has joined #ruby
SnowboardTechie has joined #ruby
LoneHermit has joined #ruby
duckpuppy has joined #ruby
Mirubiri has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
davidklsn has joined #ruby
<Mirubiri>
Hi!, somebody knows where is safe navigator operator documented?
<dminuoso>
Mirubiri: If you want, you can make a pull request on github.
<dminuoso>
And document it yourself.
<Mirubiri>
I'm gonna check 2.4 docs...
<dminuoso>
Mirubiri: *trunk you mean :)
<Mirubiri>
yeah
<Mirubiri>
nope
<Mirubiri>
not documented
nando293921 has joined #ruby
<Mirubiri>
but I thnik that flip flop is documented somewhere
Helheim_ has joined #ruby
<dminuoso>
Mirubiri: It is infact, wow I have never seen this folder of rdocs.
ChiefAlexander has joined #ruby
Helheim_ has quit [Max SendQ exceeded]
<Mirubiri>
yeah, at the end of control expressions
<dminuoso>
Think I may have only looked at the refinements.rdoc from that folder.
Helheim_ has joined #ruby
The_Phoenix1 has quit [Quit: Leaving.]
IanMalcolm has joined #ruby
Helheim has quit [Remote host closed the connection]
etetz has joined #ruby
terrabl has joined #ruby
tyang has quit [Ping timeout: 265 seconds]
<terrabl>
I'm having trouble checking to see if a float is equal to nil. I tried doing if float.nil == false but I'm getting a NoMethodError, is this not the correct way to see if a float is nil
JeanCarloMachado has quit [Ping timeout: 264 seconds]
JakFrist has joined #ruby
aupadhye has quit [Quit: Leaving]
<dminuoso>
terrabl: use .nil?
<ghr>
1.0.nil?
<terrabl>
ohh whoops.
<terrabl>
thanks guys
failshell has joined #ruby
<dminuoso>
terrabl: and you dont need to test this ever: foo == false
tvw has quit [Remote host closed the connection]
<dminuoso>
terrabl: It's an unnecessary comparison. Just use: "if float.nil?" or "unless float.nil?"
fergal_ has joined #ruby
<terrabl>
Hmm, im confused on the unless statement. Is if float.nil? the same as unless float.nil?
<canton7>
if (true == true) == false
cschneid_ has joined #ruby
aufi has quit [Remote host closed the connection]
marsjaninzmarsa has joined #ruby
<ghr>
`unless float.nil?` is the same as `if ! float.nil?`
<dminuoso>
terrabl: unless just negates the condition
<dminuoso>
terrabl: Pick the one that reads better in the context.
chouhoulis has joined #ruby
<terrabl>
Perfect, thanks for that.
<ghr>
using unless/else is generally avoided though
<dminuoso>
terrabl: Personally I only use "unless" when used as modifier_unless
whiteline has quit [Read error: Connection reset by peer]
terrabl has quit [Quit: Page closed]
whiteline has joined #ruby
axsuul has joined #ruby
rafadc has quit []
mim1k has joined #ruby
dminuoso has quit [Remote host closed the connection]
Helheim_ is now known as Helheim
pokalyis has joined #ruby
rodfersou is now known as rodfersou|lunch
marsjaninzmarsa has quit [Ping timeout: 258 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grn has quit [Remote host closed the connection]
nando293921 has quit [Ping timeout: 250 seconds]
beilabs has joined #ruby
beilabs_ has quit [Ping timeout: 265 seconds]
dmst has joined #ruby
SnowboardTechie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SnowboardTechie has joined #ruby
macsteps has joined #ruby
rstacruz has joined #ruby
AzureStigma has joined #ruby
cschneid_ has quit []
d0lph1n98 has quit [Quit: leaving]
SnowboardTechie has quit [Ping timeout: 250 seconds]
macsteps has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
[Butch] has joined #ruby
<Diabolik>
what's the general consensus on hanami vs Rails
teclator has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fmcgeough has quit [Quit: fmcgeough]
AndrewIsHere has joined #ruby
xlegoman has joined #ruby
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
calipso has joined #ruby
<apeiros>
is there ever consensus on questions like this?
Mon_Ouie has quit [Ping timeout: 244 seconds]
Guest38_ has joined #ruby
<calipso>
Hi
beilabs has quit [Remote host closed the connection]
<eam>
consensus is: both appear to be software
beilabs has joined #ruby
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
morochena has joined #ruby
morochena has quit [Client Quit]
mrgrieves has quit [Ping timeout: 250 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
<zacts>
hello
eljimador has quit [Read error: Connection reset by peer]
mfb2 has joined #ruby
<zacts>
I'm going to try to port the latest ruby to minix3
solars has joined #ruby
<zacts>
can I link ruby easily against gnu pthreads?
<zacts>
(and is this a proper channel to ask this question?)
ftj has joined #ruby
<zacts>
:-)
beilabs has quit [Ping timeout: 244 seconds]
<zacts>
minix3 doesn't offer threads by default or something
<ftj>
Interesting little puzzle here. I have an application in which users contribute content. Some users include images to represent their content. Others don't. For the ones that don't, I'd like to generate a hex color deterministically based on attributes of the item. Any ideas on an algo for something like that?
<ftj>
I could use, for example, the id of the item and the first letter of its name (or something)
SnowboardTechie has joined #ruby
AzureStigma has joined #ruby
sumobob has joined #ruby
Vingador has joined #ruby
<eam>
zacts: that's a bit of a confusing question; ruby links pthread by default
teclator has joined #ruby
fergal_ has quit [Quit: fergal_]
<eam>
oh, do you mean pth?
<zacts>
eam: I meant pth yes
AzureStigma has quit [Client Quit]
mindcrimes has joined #ruby
<eam>
sounds like a fascinating experiment
jhodge521 has joined #ruby
tk__ has quit [Quit: ばいばい]
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #ruby
<mindcrimes>
anyone know how to run two bots on one script?
Lord_of_Life has quit [Changing host]
Lord_of_Life has joined #ruby
<zacts>
eam: heh ok
<eam>
if pth implements pthread then I don't see how it could fail to link
<mindcrimes>
or at last have both of the bots communicate with eachover?
<zacts>
I'll let you know how far I get
govg has quit [Ping timeout: 250 seconds]
sumobob has quit [Remote host closed the connection]
<eam>
whether it works is another matter of course
LoneHermit has joined #ruby
mfb2 has quit []
<zacts>
it will be awesome to run ruby on minix3. I would like to have ruby + minix3 + beaglebone to demonstrate at my local ruby meetup
glcx_ has quit [Quit: Quitte]
Chair has quit [Ping timeout: 240 seconds]
marsjaninzmarsa has joined #ruby
Mirubiri has quit [Read error: No route to host]
dionysus69 has joined #ruby
duckpuppy has quit [Ping timeout: 252 seconds]
TomyLobo has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
LoneHermit has quit [Ping timeout: 252 seconds]
Velizar has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
edwinvdgraaf has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hipertracker has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.4]
tw1sted has quit [Remote host closed the connection]
fergal_ has joined #ruby
symm- has joined #ruby
SilverKey has quit [Quit: Halted.]
<trinaldi>
Hi, I have a HTML snippet with the code:<p class="cms-center"><b>content</b></p>. I'm using .scan to turn it to an array. How can I get that exactly content, including the tags? So far I'm getting only what's inside the <p> tag
grn has joined #ruby
tw1sted has joined #ruby
TPug has joined #ruby
<matthewd>
trinaldi: Same question: why not nokogiri?
ftj has quit [Read error: Connection reset by peer]
SnowboardTechie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<trinaldi>
Sorry, I was out for lunch. As I said, we are already using Prawn to write the PDF
<matthewd>
How is that related to what you use to parse the HTML?
hipertracker has quit [Quit: hipertracker]
<calipso>
Yepp
mindcrimes has left #ruby [#ruby]
amclain has joined #ruby
<trinaldi>
I'm new to the project and Ruby, tbh.
beilabs has joined #ruby
<trinaldi>
We are making some medical reports, we use a pdf and a png as the template and the doctor signature. The HTML part would be the doctor notes, if you will.
rails has joined #ruby
grn has quit [Ping timeout: 258 seconds]
mikecmpbll has quit [Ping timeout: 276 seconds]
platzhirsch has quit [Ping timeout: 244 seconds]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<matthewd>
trinaldi: Basically, manual parsing of HTML is problematic.
frozengeek has quit [Ping timeout: 244 seconds]
<trinaldi>
Indeed
<matthewd>
trinaldi: .. whereas it's exactly the job nokogiri is there for
<aeruder>
i think you should use nokogiri
<aeruder>
don't know if it has been mentioned, but you should really look into it (nokogiri)
<aeruder>
lol
<trinaldi>
I'm gonna look through Nokogiri documentation and see what I can come up with. Thanks so far, guys.
<trinaldi>
It doesn't seem so difficult to both use it and integrate it with the current project
SteenJobs has joined #ruby
eljimmy has joined #ruby
fergal_ has quit [Quit: fergal_]
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
macsteps has joined #ruby
brendan- is now known as bmurt
r_rios has quit [Ping timeout: 240 seconds]
polyidus has joined #ruby
Devalo has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
macsteps has quit [Remote host closed the connection]
Devalo has joined #ruby
kyleolivo has joined #ruby
hahuang65 has joined #ruby
matp has quit [Remote host closed the connection]
jaequery has joined #ruby
xapak has joined #ruby
<xapak>
Hello there.
RegulationD has quit []
xapak has left #ruby [#ruby]
AlexJakeGreen has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
<ramfjord>
this is a pretty good resource for writing pretty tests
Eiam_ has joined #ruby
<snebel>
nice
<snebel>
what i really tried to do is to store a big hash with "fixtures" out of the _spec files
<snebel>
then being able to use them within the _spec files
matp has joined #ruby
<snebel>
doing Hash.each and using the key and value..
duckpuppy has quit [Ping timeout: 250 seconds]
<snebel>
I'm going to use let as proposed to load the Hash and reuse it
<ramfjord>
ahh, that makes sense
karapetyan has quit [Remote host closed the connection]
duckpuppy has joined #ruby
<snebel>
but still thinking on having the Hash definition in the spec_helper
<ramfjord>
does the hash need to be mutable? Does it contain ruby classes?
<snebel>
because is huge and ugly
<snebel>
does this make sense?
<snebel>
no just strings
<ramfjord>
yeah, that makes sense. You could even put it in a separate file
shmuli has quit [Ping timeout: 250 seconds]
<snebel>
cool!
postmodern has quit [Ping timeout: 250 seconds]
<snebel>
yeah I'm so happy hehehe
<snebel>
thanks
<ramfjord>
you might consider just putting it in a yaml file, and doing let!(:hash) { File.read("spec/resources/hash.yaml") }
<snebel>
ohhh really cool
<ramfjord>
doh - YAML.load(File.read(blah))
<snebel>
much better yeah
<snebel>
clap clap clap :-)
karapetyan has joined #ruby
craigp_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
JakFrist has joined #ruby
Cohedrin has joined #ruby
jhodge522 has joined #ruby
jhodge521 has quit [Ping timeout: 258 seconds]
jhodge522 is now known as jhodge521
Cohedrin has quit [Max SendQ exceeded]
xall has joined #ruby
AzureStigma is now known as AzureStigma|Away
AzureStigma|Away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has quit [Client Quit]
Cohedrin has joined #ruby
xall has joined #ruby
nando293921 has joined #ruby
snath has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
sepp2k has joined #ruby
<snath>
how do I convince Net::SSH::Telnet to absolutely never ask for a password?
postmodern has joined #ruby
Xiti has quit [Quit: Xiti]
zacts has quit [Ping timeout: 244 seconds]
n90b0jjf has joined #ruby
<n90b0jjf>
when API's require a user redirect (for auth), is it possible to do all that through an HTTP client, assuming the correct credentials are passed? (and get the proper auth code param at the end)
antgel has quit [Ping timeout: 244 seconds]
jhodge522 has joined #ruby
nando293921 has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
jhodge521 has quit [Ping timeout: 265 seconds]
jhodge522 is now known as jhodge521
dhollinger has quit [Remote host closed the connection]
Xiti has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
ponyofdeath has joined #ruby
hahuang65 has joined #ruby
<ponyofdeath>
hi, trying to figure out the syntax for this vagrant plugin i am trying to trouble shoot
<ponyofdeath>
does that mean if version_command exists run 1 : or 2
<ponyofdeath>
what does the : mean there
<Papierkorb>
ponyofdeath: `x ? y : z` is the ternary operator. It says "if (x), then (y) else (z)"
<ponyofdeath>
Papierkorb: thanks!
<Papierkorb>
ponyofdeath: Besides, both branches are the same so the operator is useless, and the # at the start makes the line a comment (so it's not run)
Guest38_ has quit [Read error: Connection reset by peer]
ChiefAlexander has joined #ruby
<ponyofdeath>
yup thats me trying to get it to work
<Papierkorb>
ponyofdeath: Maybe you meant something like this: @version = run(:start, '--version') if support_version_command?
<ponyofdeath>
basically lxc-version is dpricated and need to use lxc-start --version
<ponyofdeath>
so i modified the support_version_command to look for lxc-start
Devalo has quit [Remote host closed the connection]
<ponyofdeath>
and the if @version =~ /(lxc version:\s+|)(.+)\s*$/ to be just if @version =~ /(.+)\s*$/
<ponyofdeath>
as lxc-start --version returns just 2.0.3
Nahra has quit [Ping timeout: 240 seconds]
<ponyofdeath>
not sure $2.downcase is needed but
Devalo has joined #ruby
macsteps has joined #ruby
jhodge521 has quit [Quit: jhodge521]
rajdesai has joined #ruby
djbkd has joined #ruby
<Papierkorb>
Ah. LXC. Why on earth don't they have at least a stable CLI 'api'.
<Papierkorb>
Bunch of scripts broke on my end too some time ago. Whole lxc-* tools were gone and replaced by who knows what.
<ponyofdeath>
lol
<ponyofdeath>
yeah
Vingador has joined #ruby
r_rios has joined #ruby
<ponyofdeath>
/home/vladi/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/lib/vagrant-lxc/driver/cli.rb:37:in `version': Unable to parse lxc version! (RuntimeError)
<ponyofdeath>
from /home/vladi/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/lib/vagrant-lxc/driver/cli.rb:148:in `support_config_command?'
<ponyofdeath>
is there some cache i need to fix or something
dmst has quit [Quit: Connection closed for inactivity]
Devalo has quit [Ping timeout: 250 seconds]
<Papierkorb>
No idea, the Vagrant API could do something magical.
<Papierkorb>
ponyofdeath: Also, you don't want to mess directly in the installed gem source. Instead, `git clone` it somewhere, make vagrant use that, and then work on your own copy
<Papierkorb>
ponyofdeath: Or is that how you do it with Vagrant plugins?
rstacruz has quit [Quit: rstacruz]
Torrone has quit [Quit: This computer has gone to sleep]
<ponyofdeath>
hmm, well modifying the code seems to work as if i break it it def breaks :)
<ponyofdeath>
any ideas why def support_config_command?
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #ruby
LastWhisper____ has quit [Read error: Connection reset by peer]
<ramfjord>
snath: looks like you pass a Net::SSH to Net::SSH::Telnet, and Net::SSH takes an auth_methods parameter on creation that you could use to disable password auth
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs has quit [Ping timeout: 276 seconds]
Jackneill has joined #ruby
banisterfiend has joined #ruby
LastWhisper____ has joined #ruby
banisterfiend has quit [Client Quit]
Jackneill has quit [Read error: Connection reset by peer]
<colept>
Let's say I have ModuleA with method_missing that calls methodA. I can't seem to override methodA without also overriding method_missing. Why?
<soulisson>
baweaver, thank you
symm- has quit [Quit: Leaving...]
<baweaver>
colept: Do you have some example code that you could gist?
spider-mario has quit [Remote host closed the connection]
<colept>
okie doke
<colept>
thanks baweaver!
<baweaver>
np np
Rodya_ has quit [Remote host closed the connection]
<colept>
I think this question is more ruby-specific? Is there a way to "override" a method by copying the same source (without explicitly copying it)
<colept>
Because if I could just reallocate the method I think it would be ok
xlegoman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 244 seconds]
nando293921 has joined #ruby
xybre has joined #ruby
PoweredByPrana has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
surrounder has quit [Quit: WeeChat 1.4]
symm- has quit [Quit: Leaving...]
surrounder has joined #ruby
symm- has joined #ruby
agent_white has quit [Quit: brb]
Lord_of_Life has quit [Excess Flood]
Lord_of_Life has joined #ruby
PoweredByPrana has joined #ruby
Spami has joined #ruby
kyleolivo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
xall has quit [Ping timeout: 250 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
byteflame has joined #ruby
symm- has quit [Quit: Leaving...]
stevecrozz has joined #ruby
<stevecrozz>
I'm finding that Mutex#synchronize occasionally raises Errno::EINTR. Is that expected? I'm not seeing much info on this happening to other people
<stevecrozz>
Am I expected to retry interrupted system calls in Mutex#synchronize? or should ruby be doing that under the hood for me?
ur5us has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
griffindy has joined #ruby
flashpoint9 has joined #ruby
PoweredByPrana has quit [Quit: My Mac has gone to sleep. ZZZzzz…]