ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
bjensen has quit [Quit: bjensen]
ben_m has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
dalekurt has quit [Quit: Zzz...]
ben_m has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
savage- has joined #ruby-lang
savage- has quit [Remote host closed the connection]
piyush has quit [Ping timeout: 252 seconds]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
AndChat| has joined #ruby-lang
benanne has quit [Quit: kbai]
mistym has quit [Remote host closed the connection]
wpaulson has joined #ruby-lang
toretore has quit [Quit: Leaving]
krz has joined #ruby-lang
savage- has joined #ruby-lang
savage- has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
gix has quit [Ping timeout: 265 seconds]
flebel has quit [Ping timeout: 252 seconds]
gix has joined #ruby-lang
bastilian has joined #ruby-lang
flebel has joined #ruby-lang
alindeman has quit [Ping timeout: 240 seconds]
igaiga has joined #ruby-lang
alindeman has joined #ruby-lang
alindeman has quit [Client Quit]
alindeman has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
imperator has joined #ruby-lang
sush24 has joined #ruby-lang
sush24 has left #ruby-lang ["Leaving"]
sush24 has joined #ruby-lang
<sush24> hi.. I trying out nokogiri … I've got to this point doc.xpath('//h2[@class = "news"]/a') I need to get html inside the a tags
<sush24> .text strips the html
<sush24> .content too
<FiXato> iirc there also is .html or .inner_html
<sush24> FiXato, thank you! worked great
havenn has joined #ruby-lang
outoftime has quit [Ping timeout: 252 seconds]
andrewhl has joined #ruby-lang
AndChat| has quit [Ping timeout: 265 seconds]
havenn has quit [Ping timeout: 245 seconds]
igaiga has quit [Remote host closed the connection]
ryez has quit [Quit: Page closed]
Banistergalaxy has joined #ruby-lang
dvorak has quit [Read error: Connection reset by peer]
dvorak has joined #ruby-lang
dvorak has quit [Client Quit]
dvorak has joined #ruby-lang
outoftime has joined #ruby-lang
umttumt has joined #ruby-lang
banisterfiend has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 255 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
sepp2k has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby-lang
macmartine has joined #ruby-lang
macmartine has quit [Client Quit]
lsegal has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
hakunin has quit [Ping timeout: 260 seconds]
sailias has joined #ruby-lang
macmartine has joined #ruby-lang
brunocoelho has joined #ruby-lang
banisterfiend` has joined #ruby-lang
tris has joined #ruby-lang
banisterfiend has quit [Ping timeout: 248 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
jbsan has quit [Ping timeout: 245 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
jbsan has joined #ruby-lang
mistym has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
rippa has joined #ruby-lang
Dreamer3 has quit [Quit: Computer has gone to sleep.]
macmartine_ has joined #ruby-lang
macmartine has quit [Ping timeout: 245 seconds]
macmartine_ is now known as macmartine
flowerpot has joined #ruby-lang
sora_h is now known as s0ra_h
msaffitz has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
banisterfiend` has quit [Ping timeout: 260 seconds]
macmartine has quit [Quit: macmartine]
hakunin has joined #ruby-lang
alindeman has quit [Ping timeout: 240 seconds]
TheHunter_1039 has quit [Quit: TheHunter_1039]
alindeman has joined #ruby-lang
S1kx has quit [Ping timeout: 245 seconds]
gnufied1 has joined #ruby-lang
gnufied1 has quit [Client Quit]
msaffitz has quit [Quit: Computer has gone to sleep.]
asahi has joined #ruby-lang
havenn has joined #ruby-lang
ben_m has quit [Quit: Leaving]
tyman has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
znz_jp has joined #ruby-lang
havenn has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
M4g1c5t0rM has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
tyman has quit [Read error: Connection reset by peer]
msaffitz has joined #ruby-lang
rippa has quit [Ping timeout: 265 seconds]
stardiviner has joined #ruby-lang
msaffitz has quit [Quit: Computer has gone to sleep.]
msaffitz has joined #ruby-lang
sailias has quit [Ping timeout: 260 seconds]
yannis has quit [Read error: Operation timed out]
msaffitz has quit [Quit: Computer has gone to sleep.]
ryanf_ has joined #ruby-lang
sailias has joined #ruby-lang
sailias has quit [Ping timeout: 260 seconds]
macmartine has joined #ruby-lang
yugui_zzz is now known as yugui
slyphon has quit [Ping timeout: 245 seconds]
foucist has joined #ruby-lang
coryf has joined #ruby-lang
dalekurt has joined #ruby-lang
misham has joined #ruby-lang
perryh is now known as perryh_away
s0ra_h is now known as sora_h
perryh_away is now known as perryh
tyman has joined #ruby-lang
ryanf_ has quit [Quit: broken pipes |||]
brunocoelho has quit [Remote host closed the connection]
coryf has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
Weems has quit [Ping timeout: 245 seconds]
flowerpot has quit [Quit: Ex-Chat]
tofaffy has quit [Ping timeout: 244 seconds]
dalekurt has quit [Quit: Zzz...]
<banisterfiend> j
<banisterfiend> hi hi hi
dalekurt has joined #ruby-lang
macmartine has joined #ruby-lang
savage- has joined #ruby-lang
tofaffy has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
tofaffy has quit [Changing host]
tofaffy has joined #ruby-lang
<andrewhl> 3.times { puts "hi" }
misham has quit [Ping timeout: 264 seconds]
Skif has quit [Ping timeout: 240 seconds]
<banisterfiend> Tasser: are you here?
Skif has joined #ruby-lang
savage- has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
yugui is now known as yugui_zzz
umttumt has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
Skif has joined #ruby-lang
yannis has joined #ruby-lang
xtagon has quit [Read error: Operation timed out]
yannis has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
Fullmoon has joined #ruby-lang
dalekurt has quit [Quit: Zzz...]
charliesome has joined #ruby-lang
Utkarsh has quit [Remote host closed the connection]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<ryanf> banisterfiend: "j"?
<ryanf> are you using vim now
macmartine has quit [Quit: macmartine]
<banisterfiend> ryanf: hi
<banisterfiend> ryanf: takl in #pry
vbatts has quit [Ping timeout: 245 seconds]
dr0id has joined #ruby-lang
<dr0id> while using Sass::Engine.new() can I pass in som option to load compass?
savage- has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Skif has quit [Ping timeout: 240 seconds]
<banisterfiend> dr0id: hey, you're on forrst?
Skif has joined #ruby-lang
<dr0id> its a boring place now
vbatts has joined #ruby-lang
<banisterfiend> dr0id: could you add me?
<banisterfiend> dr0id: i can't seem to get s forrst account
andrewhl has quit [Remote host closed the connection]
crankharder has quit [Read error: Operation timed out]
<Tasser> banisterfiend, pong
perryh is now known as perryh_away
<banisterfiend> Tasser: did u try plymouth yet
<Tasser> nah, no need
brushbox has joined #ruby-lang
<banisterfiend> Tasser: but u were asking about a pry console that intercepts minitest failures
crankharder has joined #ruby-lang
QaDeS has joined #ruby-lang
perryh_away is now known as perryh
brushbox has quit [Quit: Leaving.]
perryh is now known as perryh_away
igaiga has joined #ruby-lang
outsmartin has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
Criztian has joined #ruby-lang
gsav has joined #ruby-lang
vbatts has quit [Ping timeout: 245 seconds]
tyman has quit [Ping timeout: 245 seconds]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
vbatts has joined #ruby-lang
crankharder has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 264 seconds]
tyman has joined #ruby-lang
Guest18502 has quit [Remote host closed the connection]
Z33K|Lux has quit []
yugui_zzz is now known as yugui
piyush has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
charliesome has quit [Ping timeout: 250 seconds]
<Tasser> banisterfiend, indeed, but I found the bug by then
<banisterfiend> Tasser: you're a liar and a thief and you've subjected to me insult and disappointment always, always
bjensen has joined #ruby-lang
<zenspider> dem's fightin' words
yugui is now known as yugui_zzz
qwerxy has joined #ruby-lang
savage- has quit [Remote host closed the connection]
igotnolegs has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 260 seconds]
comctrl6 has joined #ruby-lang
tyman has quit [Quit: tyman]
comctrl6 has left #ruby-lang [#ruby-lang]
<rue> Fighty fight yay
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
toretore has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
agilob has quit [Quit: leaving]
agilob has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 240 seconds]
retro_ has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 240 seconds]
imperator has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
charliesome has joined #ruby-lang
saLOUt has joined #ruby-lang
yugui_zzz is now known as yugui
benanne has joined #ruby-lang
A124 has joined #ruby-lang
vbatts has quit [Ping timeout: 272 seconds]
jlawler has joined #ruby-lang
vbatts has joined #ruby-lang
piyush has quit [Ping timeout: 264 seconds]
KINGSABRI has joined #ruby-lang
qwerxy has quit [Quit: offski]
KINGSABRI has quit [Read error: Connection reset by peer]
KINGSABRI has joined #ruby-lang
EvilJStoker has quit [Excess Flood]
tbuehlmann has joined #ruby-lang
KINGSABRI has quit [Read error: Connection reset by peer]
KINGSABRI has joined #ruby-lang
EvilJStoker has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
imperator has left #ruby-lang ["Leaving"]
KINGSABRI has quit [Read error: Connection reset by peer]
Axsuul has quit [Ping timeout: 245 seconds]
retro_ has quit [Read error: Connection reset by peer]
ben_m has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
bastilian has joined #ruby-lang
yugui is now known as yugui_zzz
stardiviner has joined #ruby-lang
stardiviner has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
diegoviola has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
<dkannan> about GC in ruby. not rails/activerecord specific
dejongge has joined #ruby-lang
<Tasser> dkannan, just a guess: identitiy map
<Tasser> or didn't they implement that yet
igaiga has joined #ruby-lang
<whitequark> identity map was disabled recently
<Tasser> whitequark, good to know
<dkannan> Tasser: i tried answering it. could reproduce it even for a simple program - without rails
<Tasser> dkannan, wow
<banisterfiend> someone writ eme code to go from "BindingOfCaller" to "binding_of_caller" thx :D
countdigi has quit [Ping timeout: 272 seconds]
<whitequark> yeah, nice advice
stardiviner has joined #ruby-lang
brunocoelho has joined #ruby-lang
fayimora has joined #ruby-lang
Dreamer3 has joined #ruby-lang
<bnagy> "BindingOfCaller".scan(/([A-Z][a-z]+)/).flatten.map(&:downcase).join('_')
<banisterfiend> bnagy: cool thanks
brunocoelho has quit [Remote host closed the connection]
<apeiros_> or require 'active_support/core_ext'; str.underscore
<apeiros_> bnagy: if you use (?: instead of (, you can leave the flatten away
<Tasser> apeiros_, I think active_support/core_ext/string is sufficient
<apeiros_> Tasser: probably, yeah
<apeiros_> I'm lazy :)
<bnagy> actually the brackets are left over from trying split, they shouldn't be there at all, nor should the flatten
<banisterfiend> bnagy: can u fix it up sexy for me
<bnagy> .scan(/[A-Z][a-z]+/).map(&:downcase).join('_') but I wouldn't call it sexy
brushbox has joined #ruby-lang
<Tasser> bnagy, not enough (.)(.)?
<bnagy> and it's broken for things like YAMLStringCreator
<bnagy> Tasser: :D
umttumt has quit [Remote host closed the connection]
umttumt has joined #ruby-lang
<apeiros_> it's also broken for "A_B_C_stuff"
<apeiros_> # => "" :)
chendo_ has joined #ruby-lang
<kyrylo> The given string is a camelCase string.
<banisterfiend> no it's CamelCase
<Tasser> looks more like CamelCase to me
<banisterfiend> it's a module name i want to convert to a gem name
<banisterfiend> what's a name that combines the idea of an owner and receiver? i have a method that returns the receiver (in case of singleton method) or owner (in case of normal methods) but i cant thin of a ne=ame for it
brushbox has quit [Quit: Leaving.]
<outsmartin> banisterfiend: producre consumer?
yugui_zzz is now known as yugui
<banisterfiend> i just called it method_host() in the end
postmodern has quit [Quit: Leaving]
piyush has joined #ruby-lang
gsav has quit [Ping timeout: 255 seconds]
<dkannan> banisterfiend: what is the diff btw owner and receiver. if i include a module M in Class A. then A is the receiver but M is the owner ?
<banisterfiend> dkannan: no
<banisterfiend> dkannan: class A; def bing; end; end; alpha = A.new a.bing ; a is the receiver of bing, A is the owner
<banisterfiend> alpha*
<banisterfiend> u get it
<Mon_Ouie> The receiver is the object you call a method on obj in (obj.foo), the owner is the class/module that defines the method
<Mon_Ouie> (obj in obj.foo)*
vesan_ has quit [Remote host closed the connection]
vesan has joined #ruby-lang
<dkannan> ok
<banisterfiend> dkannan: say "thank you very much sirs" not just 'ok', 'ok' hurts our feelings
<banisterfiend> ;)
<dkannan> :-)
bastilian has quit [Quit: Leaving...]
<dkannan> much obliged, gracias :-)
umttumt has quit [Remote host closed the connection]
gsav has joined #ruby-lang
<dkannan> banisterfiend: why are u writing such a function ? what happens of the singleton method is up the inheritance/module chain ?
<dkannan> r/of/id
yugui is now known as yugui_zzz
<banisterfiend> dkannan: because i want a module with a name, if possible (though still not guaranteed); and a singleton method's receiver is more likely to have a name than its owner
umttumt has joined #ruby-lang
<banisterfiend> in the case of singleton methods for classes/modules
cynosure has quit [Ping timeout: 252 seconds]
cynosure has joined #ruby-lang
<dkannan> banisterfiend: ah ok. maybe drop into the code a do a defined? or a method ?
vesan has quit [Read error: Connection reset by peer]
<dkannan> banisterfiend: you can call it father/mother/cousin :-) like in an ancestory tree
vesan_ has joined #ruby-lang
<dkannan> banisterfiend: find_method also makes sense
<banisterfiend> thx
<dkannan> banisterfiend: or even find_closest/next_method
A124 has quit [Quit: Leaving.]
jimmy1980 has joined #ruby-lang
bastilian has joined #ruby-lang
countdigi has joined #ruby-lang
dalekurt has joined #ruby-lang
qwerxy has quit [Quit: offski]
dalekurt has quit [Quit: I'll be back!]
dr0id has left #ruby-lang [#ruby-lang]
A124 has joined #ruby-lang
jxie has quit [Quit: leaving]
umttumt has quit [Remote host closed the connection]
ttilley is now known as ttilley_off
dreieins has quit [Quit: and away]
A124 has quit [Quit: Leaving.]
workmad3 has joined #ruby-lang
umttumt has joined #ruby-lang
igaiga has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
A124 has joined #ruby-lang
A124 has quit [Client Quit]
heftig has quit [Quit: leaving]
A124 has joined #ruby-lang
heftig has joined #ruby-lang
A124 has quit [Client Quit]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
cube526 has joined #ruby-lang
qwerxy has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
cube526 has quit [Client Quit]
sailias has joined #ruby-lang
TheHunter_1039 has joined #ruby-lang
cube526 has joined #ruby-lang
Keva161 has joined #ruby-lang
workmad3 has joined #ruby-lang
mistym has joined #ruby-lang
cantonic has quit [Quit: cantonic]
gregf has quit [Ping timeout: 244 seconds]
andrewhl has joined #ruby-lang
cube526 has quit [Quit: Bye]
qwerxy has quit [Quit: offski]
macmartine has joined #ruby-lang
workmad3 has quit [Ping timeout: 250 seconds]
seanstickle has joined #ruby-lang
krz has quit [Quit: krz]
selvakumaran has joined #ruby-lang
sailias has quit [Quit: Leaving.]
outoftime has quit [Ping timeout: 260 seconds]
mssola has joined #ruby-lang
fayimora has quit [Ping timeout: 260 seconds]
fayimora_ has joined #ruby-lang
thone_ has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
fayimora_ has quit [Client Quit]
thone has quit [Ping timeout: 248 seconds]
jperry2 has joined #ruby-lang
piyush has quit [Ping timeout: 260 seconds]
Criztian has joined #ruby-lang
cirenyc has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
outoftime has joined #ruby-lang
crankharder has joined #ruby-lang
Keva161 has quit [Remote host closed the connection]
bastilian has quit [Quit: Leaving...]
jperry2 has quit [Quit: jperry2]
asahi has quit [Quit: Leaving.]
lsegal has joined #ruby-lang
slyphon has joined #ruby-lang
publicvoid_ has quit [Remote host closed the connection]
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
gregf has joined #ruby-lang
esq has joined #ruby-lang
jimmy1980 has quit [Ping timeout: 265 seconds]
bastilian has joined #ruby-lang
hynkle has joined #ruby-lang
jimmy1980 has joined #ruby-lang
hynkle has quit [Client Quit]
jperry2 has joined #ruby-lang
gsav has quit [Read error: Operation timed out]
gsav has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
jimrollenhagen has quit [Quit: ZNC - http://znc.sourceforge.net]
jxie has joined #ruby-lang
tonni_ has joined #ruby-lang
tonni has quit [Read error: Connection reset by peer]
jperry2 has quit [Quit: jperry2]
ruurd has joined #ruby-lang
crankharder has quit [Quit: leaving]
kalleth has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
sora_h is now known as s0ra_h
awwaiid has quit [Read error: Connection reset by peer]
awwaiid has joined #ruby-lang
umttumt has quit [Remote host closed the connection]
rippa has joined #ruby-lang
jperry2 has joined #ruby-lang
jperry2 has quit [Client Quit]
krohrbaugh has joined #ruby-lang
esq has quit [Remote host closed the connection]
selvakumaran has quit [Ping timeout: 260 seconds]
cdt has joined #ruby-lang
cdt has quit [Client Quit]
cdt has joined #ruby-lang
kalleth has joined #ruby-lang
cdt has quit [Ping timeout: 260 seconds]
tomb_ has joined #ruby-lang
rolfb has joined #ruby-lang
selvakumaran has joined #ruby-lang
rolfb has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
t has joined #ruby-lang
t is now known as Guest35836
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
saLOUt has quit [Quit: Konversation terminated!]
coryf has joined #ruby-lang
cube526 has joined #ruby-lang
Z33K|Lux has joined #ruby-lang
crackity_jones has joined #ruby-lang
cube526 has quit [Client Quit]
retro|cz has joined #ruby-lang
coryf has quit [Remote host closed the connection]
umttumt has joined #ruby-lang
coryf has joined #ruby-lang
umttumt has quit [Remote host closed the connection]
perryh_away is now known as perryh
Guest35836 has quit [Remote host closed the connection]
fayimora has joined #ruby-lang
t has joined #ruby-lang
t is now known as Guest10243
cirenyc has quit [Quit: Leaving...]
coryf has quit [Remote host closed the connection]
bjensen has quit [Quit: bjensen]
cube526 has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
wallerdev has joined #ruby-lang
robotmay has joined #ruby-lang
ryanf has joined #ruby-lang
wallerdev has quit [Client Quit]
tyman has joined #ruby-lang
wallerdev has joined #ruby-lang
cube526 has quit [Quit: Bye]
qwerxy has joined #ruby-lang
misham has joined #ruby-lang
qwerxy has quit [Quit: offski]
piyush has joined #ruby-lang
raz has joined #ruby-lang
<raz> hmm
<raz> is it a coincidence that [Float::NAN] == [Float::NAN] evaluates to true?
<raz> or rather sometimes to true and sometimes to false? i.e. that different kinds of Float::NAN exist?
qwerxy has joined #ruby-lang
selvakumaran has quit [Ping timeout: 265 seconds]
<Mon_Ouie> I think it's false when the two nans aren't the same object (i.e. different object)
<Mon_Ouie> The constant will always give you the same object
Bwild has quit [Quit: leaving]
<raz> ahh!
<raz> that explains why my padding NANs return true and the unpacked ones false
gsav has quit [Ping timeout: 250 seconds]
<raz> thx, this was starting to give me a headache ;)
<Mon_Ouie> And I think it does that to avoid infinite recursion
<Mon_Ouie> (e.g. when an array contains itself)
Bwild has joined #ruby-lang
<raz> well, i was surprised that [Float::NAN] == [Float::NAN] would evaluate to true, but then figured that might be the ruby way
<raz> under that false premise i was thrown back when the deserialized NANs behaved differently
<raz> but your explanation makes sense
<raz> it's always the little things :)
<apeiros_> Mon_Ouie: doesn't seem to be the reason…
<apeiros_> a = Float::NAN; a == a # => false
<apeiros_> that seems like a bug, given that Array#== is supposed to test == on each object, I really wonder what's going on…
<apeiros_> maybe Array#== does an invalid optimization, testing for .equal? first
<apeiros_> (probably using a comparison of the VALUE)
qwerxy has quit [Quit: offski]
<raz> fwiw, the array-behavior was actually convenient in rspec ;)
<apeiros_> an array containing itself is not an issue either, since Array#== probably first tests for equal? (on the argument, not each element as I suspect to be the reason for the bug)
<raz> but you are right, it actually doesn't seem to make sense.
fayimora has quit [Ping timeout: 240 seconds]
<Mon_Ouie> a, b = [], []; a << b; b << a; a == b # => true
xtagon has joined #ruby-lang
<apeiros_> Mon_Ouie: hm? yes? that's expected…
<apeiros_> ah, you mean an equal? test wouldn't work
fayimora has joined #ruby-lang
<Mon_Ouie> Yeah
gsav has joined #ruby-lang
fayimora_ has joined #ruby-lang
<apeiros_> Mon_Ouie: well then, seen hash
fayimora_ has quit [Read error: Connection reset by peer]
fayimora has quit [Ping timeout: 264 seconds]
Axsuul has joined #ruby-lang
misham has quit [Ping timeout: 265 seconds]
NOKAH has joined #ruby-lang
Hakon|mbp has quit [Read error: Connection reset by peer]
NOKAH has quit [Remote host closed the connection]
Hakon|mbp has joined #ruby-lang
ryanf has quit [Ping timeout: 255 seconds]
Axsuul has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby-lang
nofxx has quit [Remote host closed the connection]
bastilian has quit [Quit: Leaving...]
solars has joined #ruby-lang
Hakon|mbp has quit [Remote host closed the connection]
Hakon|mbp has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
ruurd has joined #ruby-lang
cdt has joined #ruby-lang
bastilian has joined #ruby-lang
outsmartin has quit [Quit: Leaving.]
ryanf has joined #ruby-lang
coryf has joined #ruby-lang
Guest10243 has quit [Remote host closed the connection]
Hakon|mbp has quit [Remote host closed the connection]
tonni_ has quit [Remote host closed the connection]
Hakon|mbp has joined #ruby-lang
asahi has joined #ruby-lang
t has joined #ruby-lang
t is now known as Guest53242
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
toertore has joined #ruby-lang
mssola has quit [Quit: Konversation terminated!]
toretore has quit [Ping timeout: 272 seconds]
asahi has left #ruby-lang [#ruby-lang]
piyush has quit [Ping timeout: 244 seconds]
asahi has joined #ruby-lang
S2kx has joined #ruby-lang
<asahi> if I have an array like, [[a,b], [c,d]], how can I find and access the child array whose first element is a?
S1kx has quit [Ping timeout: 252 seconds]
<ben_m> assoc
<ben_m> Is there a ruby eval bot in this channel?
<ben_m> > [[1, 2], [3,4]].assoc 3
<ben_m> asahi, like that :)
<asahi> ben_m: I see. thanks. what if, I wanted to find by the second element?
<asahi> would I have to use something else other than assoc?
<epitron> man, assoc must be an ancient method... that's so weird
<epitron> this feels like something you'd need before ruby had hashes :)
<ben_m> Comes from Common Lisp I think
<ben_m> At least Common Lisp has it and influenced Ruby, so there's that
<ben_m> asahi, you'd have to write that yourself I guess :)
<epitron> hah
<epitron> yeah, it does feel lispy
rippa has quit [Ping timeout: 264 seconds]
<epitron> asahi: array.find { |sub_array| sub_array[1] }
<epitron> err
<epitron> asahi: array.find { |sub_array| sub_array[1] == whatever }
<epitron> for extra safety: array.find { |sub_array| sub_array[1] == whatever rescue nil }
<epitron> :)
<asahi> epitron: thanks. think i like that better than using assoc
<epitron> indeed
<asahi> but why the rescue nil? it seems like if it doesn't find it, it returns nil anyway
<epitron> oh, sorry, you're right :)
<asahi> :-)
<epitron> i'm thinking of python, which blows up when your index doesn't exist
benanne has quit [Quit: kbai]
imperator has joined #ruby-lang
bastilian has quit [Read error: Connection reset by peer]
sebastia has joined #ruby-lang
<Tasser> epitron, python is designed to blow up
<epitron> yes, i wasn't implying that it wasn't
<epitron> i was just using amusing terminology
gsav has quit [Ping timeout: 250 seconds]
<imperator> til python was designed by michael bay
<epitron> :D
<erikh> hi folks
coryf has quit [Remote host closed the connection]
<epitron> hola!
<erikh> trying to find the urge to code, met with a wall of procrastination instead.
<epitron> what're you working on?
cjs226 has quit []
<epitron> ruby scripting for nginx?
<erikh> next trick is to make it work with rack
<erikh> mruby specifically
<erikh> but yes
<epitron> sure
<epitron> sounds interesting
<erikh> yeah, it has been so far
Hakon|mbp has quit [Remote host closed the connection]
Hakon|mbp has joined #ruby-lang
gsav has joined #ruby-lang
tonni has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
sailias has joined #ruby-lang
oddmunds has quit [Ping timeout: 248 seconds]
daym0n has joined #ruby-lang
gsav has quit [Ping timeout: 264 seconds]
francisfish has quit [Ping timeout: 248 seconds]
Asher has joined #ruby-lang
<epitron> "so far", eh?
<epitron> does that mean you hit a block? :)
gsav has joined #ruby-lang
NOKAH has joined #ruby-lang
sailias has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
jperry2 has joined #ruby-lang
macmartine has quit [Quit: macmartine]
Hakon|mbp has quit [Ping timeout: 272 seconds]
tomb_ has quit [Quit: Computer has gone to sleep.]
imperator has quit [Ping timeout: 264 seconds]
tomb_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
macmartine has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
gsav has quit [Ping timeout: 245 seconds]
gsav has joined #ruby-lang
imperator has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
jaimef is now known as Ober
macmartine has quit [Quit: macmartine]
misham has joined #ruby-lang
solars has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby-lang
macmartine has quit [Client Quit]
jarred has joined #ruby-lang
<jarred> hi all
msaffitz has joined #ruby-lang
workmad3 has joined #ruby-lang
jperry2 has joined #ruby-lang
<jarred> I'm getting "A JSON text must contain at least two octets! (JSON::ParserError)" when trying to parse JSON. I understand what the error message means, but I don't understand why it's happening. Here's how I write/read the JSON to/from the file https://gist.github.com/9a2733dfa7261e118efb. Any ideas?
gsav has quit [Ping timeout: 250 seconds]
qwerxy has joined #ruby-lang
<Mon_Ouie> I don't know why you get this error, but do you have an actual reason to use JSON here?
<Mon_Ouie> It seems you could just write/read the token itself
<jarred> Yeah, this is true
<jarred> I'll just do that
frem has quit [Quit: Farewell!]
fayimora has joined #ruby-lang
fayimora has quit [Client Quit]
misham has quit [Ping timeout: 245 seconds]
s0ra_h is now known as sora_h
ruurd has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
ruurd has quit [Client Quit]
tbuehlmann has quit []
NOKAH has quit [Remote host closed the connection]
Hakon|mbp has joined #ruby-lang
yxhuvud has quit [Ping timeout: 255 seconds]
brushbox has joined #ruby-lang
ryanf has quit [Quit: leaving]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
brushbox has quit [Quit: Leaving.]
imperator has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 264 seconds]
sora_h is now known as s0ra_h
QaDeS has quit [Quit: Ex-Chat]
tallship has quit [Read error: Connection reset by peer]
tomb_ has joined #ruby-lang
brushbox has joined #ruby-lang
neocoin has joined #ruby-lang
nertzy has joined #ruby-lang
workmad3 has joined #ruby-lang
nertzy has quit [Client Quit]
nertzy has joined #ruby-lang
guns has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
brushbox has quit [Quit: Leaving.]
Nekka has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
sebastia has quit [Quit: Leaving...]
guns has quit [Quit: guns]
cube526 has joined #ruby-lang
jperry2 has joined #ruby-lang
cube526 has quit [Client Quit]
seanstickle has joined #ruby-lang
ben_m has quit [Quit: Leaving]
ben_m has joined #ruby-lang
jperry2 has quit [Client Quit]
s0ra_h is now known as sora_h
akira989 has joined #ruby-lang
malias has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
S2kx has quit [Ping timeout: 244 seconds]
ryanf has joined #ruby-lang
naquad has quit [Excess Flood]
mistym has quit [Remote host closed the connection]
naquad has joined #ruby-lang
malias has quit [Remote host closed the connection]
daym0n has quit [Ping timeout: 245 seconds]
srbartlett has joined #ruby-lang
sora_h is now known as s0ra_h
misham has joined #ruby-lang
<rking> jarred: The top level of a JSON object is always an array or object, so [] or {} is the shortest any JSON object could possibly be (that is, two bytes (aka octets))
misham has quit [Read error: Operation timed out]
s0ra_h is now known as sora_h
toertore has quit [Quit: Leaving]
Boohbah has quit [Ping timeout: 276 seconds]
retro|cz has quit [Ping timeout: 265 seconds]
retro|cz has joined #ruby-lang
<jarred> That makes sense. The problem turned out to be when I was parsing JSON later in the file, one of the query string options was wrong, causing a 500 error
postmodern has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
plusk has joined #ruby-lang
qwerxy has quit [Quit: offski]
qwerxy has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
dejongge has quit [Read error: Operation timed out]