dwknoxy has quit [Quit: Computer has gone to sleep.]
mistym has joined #ruby-lang
tylersmith has joined #ruby-lang
perdido has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
jalcine- has quit [Excess Flood]
tylersmith has quit [Ping timeout: 272 seconds]
imperator2 has quit [Ping timeout: 240 seconds]
knu has quit [Ping timeout: 240 seconds]
knu has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
ryez has joined #ruby-lang
alex-quiterio has quit [Quit: Leaving.]
tylersmith has joined #ruby-lang
mannyt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cads has quit [Quit: Leaving]
robbyoconnor has quit [Read error: Connection reset by peer]
Kabaka has quit [Read error: Operation timed out]
Rylee has quit [Ping timeout: 276 seconds]
robbyoconnor has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
rationalrevolt has quit [Remote host closed the connection]
jalcine- has joined #ruby-lang
nathanstitt has joined #ruby-lang
jsullivandigs has joined #ruby-lang
Rylee has joined #ruby-lang
clamstar has joined #ruby-lang
imperator2 has joined #ruby-lang
fire has joined #ruby-lang
bungoman has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
Rylee has quit [Ping timeout: 264 seconds]
lfox has joined #ruby-lang
jalcine- has quit [Excess Flood]
bzalasky has joined #ruby-lang
cads has joined #ruby-lang
Sammidysam has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
<Sammidysam>
I set a variable in IRB and I want to use its value in a method that I define. How can I do that (currently it says that it is undefined)?
bzalasky has quit [Remote host closed the connection]
kitak_ has quit [Remote host closed the connection]
jonahR has joined #ruby-lang
<|jemc|>
Sammidysam: please make a gist or other pastebin with what you're currently doing
<|jemc|>
gist is particularly helpful because it has comments
vlad_starkov has quit [Read error: Connection reset by peer]
fire has quit [Quit: WeeChat 0.4.1]
jsullivandigs has joined #ruby-lang
apeiros has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 260 seconds]
AKASkip has joined #ruby-lang
iliketurtles has joined #ruby-lang
amclain has quit [Quit: Leaving]
dagobah has joined #ruby-lang
Gurpreet has quit [Quit: Leaving.]
Gurpreet has joined #ruby-lang
maloik_ has quit [Ping timeout: 245 seconds]
maloik has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
daikan has joined #ruby-lang
maloik has quit [Remote host closed the connection]
maloik has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
jalcine has quit [Excess Flood]
kitak_ has quit [Remote host closed the connection]
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
soba has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
Forgetful_Lion has quit [Read error: Connection reset by peer]
daikan has quit [Ping timeout: 264 seconds]
kitak has joined #ruby-lang
maloik has quit [Remote host closed the connection]
maloik has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
kitak has quit [Ping timeout: 245 seconds]
bzalasky has quit [Remote host closed the connection]
knu0 has joined #ruby-lang
mytrile has joined #ruby-lang
lewix has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
kitak has joined #ruby-lang
Kabaka has quit [Ping timeout: 248 seconds]
Rylee has quit [Ping timeout: 265 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby-lang
postmodern has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby-lang
maloik has quit [Ping timeout: 260 seconds]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
maloik has joined #ruby-lang
jonahR has quit [Quit: jonahR]
michd is now known as MichD
jg has joined #ruby-lang
postmodern has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
rue|w has joined #ruby-lang
CoreData has quit [Quit: CoreData]
tectonic_ has quit []
relix has joined #ruby-lang
kek has joined #ruby-lang
michaeldeol has quit [Remote host closed the connection]
robmiller has quit [Quit: robmiller]
sinm has joined #ruby-lang
mytrile has quit []
ledestin has quit [Quit: ledestin]
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby-lang
bigbadbear has joined #ruby-lang
|jemc| has joined #ruby-lang
vinhbach_ has joined #ruby-lang
vinhbachsy has quit [Ping timeout: 248 seconds]
bigbadbear has quit [Ping timeout: 264 seconds]
<yorickpeterse>
morning
cnivolle has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
Kabaka has joined #ruby-lang
cnivolle has joined #ruby-lang
jacky has joined #ruby-lang
<gnufied>
Morning
solars has joined #ruby-lang
[_aeris_] is now known as _aeris_
kek has quit []
elia has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Rylee has joined #ruby-lang
jxie has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 276 seconds]
<yorickpeterse>
lololol HN back up, loss of data
michaeldeol has quit [Ping timeout: 265 seconds]
Newbie0086 has quit [Quit: 离开]
robmiller has joined #ruby-lang
MrZYX|off is now known as MrZYX
marr has joined #ruby-lang
Rylee has quit [Ping timeout: 265 seconds]
bin7me has joined #ruby-lang
mikecmpbll has joined #ruby-lang
Kabaka has quit [Ping timeout: 276 seconds]
mbj has joined #ruby-lang
vinhbach_ has quit [Remote host closed the connection]
vinhbachsy has joined #ruby-lang
vlad_starkov has joined #ruby-lang
_mh_ has quit [Changing host]
_mh_ has joined #ruby-lang
sinm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlovell has joined #ruby-lang
Guest92966 has left #ruby-lang [#ruby-lang]
daikan has joined #ruby-lang
ando has joined #ruby-lang
Caius has joined #ruby-lang
ando has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 276 seconds]
ando has joined #ruby-lang
skade has joined #ruby-lang
daikan has quit [Ping timeout: 272 seconds]
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
jsullivandigs has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ahmedelgabri has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 248 seconds]
alex-quiterio has joined #ruby-lang
sluukkonen2 has left #ruby-lang [#ruby-lang]
sluukkonen has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
chris2_ is now known as chris2
vlad_starkov has quit [Read error: Connection reset by peer]
<sluukkonen>
is there a reason for the channel mode that causes this: "Cannot change nickname while banned on channel"? I hate that I have to temporarily leave this channel every time I need to change my nick on freenode.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby-lang
vlad_starkov has joined #ruby-lang
joonty has quit [Read error: Operation timed out]
<yorickpeterse>
You need to be authed
<yorickpeterse>
Having said that, I could change my nick fine last time I wasn't authed
charliesome has joined #ruby-lang
joonty has joined #ruby-lang
<sluukkonen>
well, I need to change my nick before I can authenticate
<workmad3>
sluukkonen: use sasl auth
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
<workmad3>
sluukkonen: also, you can do /msg nickserv identify <nick> <password> in order to identify to a specific account without changing your nick
<workmad3>
but sasl auth ftw :)
h_kon has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 260 seconds]
h_kon has joined #ruby-lang
h_kon has quit [Remote host closed the connection]
r0bby_ has quit [Ping timeout: 264 seconds]
ando has quit [Ping timeout: 276 seconds]
mistym has joined #ruby-lang
mistym has quit [Ping timeout: 264 seconds]
DouweM has joined #ruby-lang
mehlah has joined #ruby-lang
symm- has joined #ruby-lang
h_kon has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
dagobah has quit [Remote host closed the connection]
dagobah has joined #ruby-lang
bigbadbear has joined #ruby-lang
daikan has joined #ruby-lang
jsullivandigs has joined #ruby-lang
bigbadbear has quit [Ping timeout: 260 seconds]
retro_ has joined #ruby-lang
daikan has quit [Ping timeout: 265 seconds]
vinhbachsy has quit []
jsullivandigs has quit [Ping timeout: 248 seconds]
kitak has quit [Remote host closed the connection]
r0bgleeson has quit [Ping timeout: 258 seconds]
<yorickpeterse>
welp, I just defined a method called "fatter_initialize"
<yorickpeterse>
opposed to "after_initialize"
<yorickpeterse>
I'll blame that on being hungry
perdido has quit [Remote host closed the connection]
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
<whitequark>
I once was hungry
<whitequark>
I realized it after reading the phrase "crisp picture"
<whitequark>
mmmmm pixels
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matti__ has left #ruby-lang [#ruby-lang]
matti has joined #ruby-lang
michaeldeol has joined #ruby-lang
alex-quiterio has quit [Quit: Leaving.]
<apeiros>
yorickpeterse: don't use beacon for testing then
<yorickpeterse>
I don't :<
x0f_ has joined #ruby-lang
<yorickpeterse>
I use rpsec
<yorickpeterse>
* rspec
<workmad3>
yorickpeterse: rpecs?
<yorickpeterse>
brb, food
charliesome has joined #ruby-lang
michaeldeol has quit [Ping timeout: 272 seconds]
<apeiros>
rrrrspeck
<apeiros>
cuz speck is beacon :)
<workmad3>
rspock
<gnufied>
what we need is - nsaspec
<workmad3>
gnufied: we have that... it's called openssl...
<gnufied>
it knows what I am going to write and writes tests itself
apeiros has quit [Remote host closed the connection]
cored has quit [Ping timeout: 272 seconds]
shinnya has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
ItSANgo has quit [Quit: Leaving...]
robbyoconnor has quit [Read error: Operation timed out]
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
kitak has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
kitak has quit [Remote host closed the connection]
vmoravec has quit [Quit: Leaving]
ahmedelgabri has quit [Remote host closed the connection]
riffraff has joined #ruby-lang
<eam>
zzak: I'm pretty sure the hh can't generate the right scan codes for stuff like volume keys on osx -- I see some hackarounds with applescript though
<eam>
seems to be a universal issue for non-mac keyboards
workmad3 has quit [Ping timeout: 260 seconds]
ItSANgo has joined #ruby-lang
tkuchiki has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
simoz110 has joined #ruby-lang
mannyt has joined #ruby-lang
mannyt has quit [Ping timeout: 272 seconds]
skade has quit [Ping timeout: 265 seconds]
jsrn has joined #ruby-lang
skade has joined #ruby-lang
enebo has joined #ruby-lang
dwknoxy has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
workmad3 has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
DevDoo has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
jsrn has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby-lang
jsrn has joined #ruby-lang
simoz111 has joined #ruby-lang
simoz110 has quit [Ping timeout: 272 seconds]
michaeldeol has quit [Ping timeout: 265 seconds]
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
ahmedelgabri has joined #ruby-lang
mistym has joined #ruby-lang
rixth_ has joined #ruby-lang
mrevd has joined #ruby-lang
mrevd has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 248 seconds]
DevDoo has quit [Ping timeout: 264 seconds]
maloik has quit [Ping timeout: 248 seconds]
aarellano has joined #ruby-lang
maloik has joined #ruby-lang
bigbadbear has joined #ruby-lang
<aarellano>
should I always keep my ruby versions upgraded to the latest patchlevel?
<aarellano>
isn't a good idea to wait a bit before upgrading? to avoid "problematic" versions like 1.9.3-p362
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
rixth_ has quit [Quit: Computer has gone to sleep.]
ando has joined #ruby-lang
maloik has quit [Remote host closed the connection]
bigbadbear has quit [Ping timeout: 260 seconds]
maloik has joined #ruby-lang
<yorickpeterse>
yes
<yorickpeterse>
Wait a bit, test things, etc
ando has quit [Write error: Broken pipe]
<yorickpeterse>
don't blindly update and assume nothing is broken in terms of ABI and the likes
ando has joined #ruby-lang
DevDoo has joined #ruby-lang
<r0bgleeson>
aarellano: i think that depends. security patch levels should be no question.
h_kon has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AKASkip has quit [Ping timeout: 248 seconds]
fijimunkii has quit [Ping timeout: 289 seconds]
ulisescab has joined #ruby-lang
DevDoo has quit [Remote host closed the connection]
mrevd has joined #ruby-lang
jovon has joined #ruby-lang
judofyr has joined #ruby-lang
mehlah has joined #ruby-lang
jxie has quit [Quit: leaving]
jsullivandigs has joined #ruby-lang
momomomomo has joined #ruby-lang
rixth_ has joined #ruby-lang
cored has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
lfox has joined #ruby-lang
cored has joined #ruby-lang
rixth_ has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby-lang
bjh13 has joined #ruby-lang
huopa has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
judofyr has quit [Remote host closed the connection]
kaneda^ has joined #ruby-lang
ando has quit [Remote host closed the connection]
lewix has joined #ruby-lang
<kaneda^>
hey guys, qq, it was just brought to my attention that URI.parse sees protocol-less URIs as invalid. while i see this as a bug, i wanted to know what other people thought
ando has joined #ruby-lang
michaeldeol has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
<workmad3>
kaneda^: URI.parse("//foo/bar") gives me a URI::Generic instance :)
<kaneda^>
try URI.parse(://google.com)
<kaneda^>
InvalidURIException
<workmad3>
kaneda^: right... that's because that *is* invalid
<wmoxam>
kaneda^: that is invalid!
<wmoxam>
:// rather than //
<workmad3>
kaneda^: the : separates the scheme at the start
mistym has joined #ruby-lang
<workmad3>
kaneda^: and an empty scheme is invalid
<kaneda^>
i think there should be support for such a URI
vlad_starkov has joined #ruby-lang
<wmoxam>
no
<workmad3>
kaneda^: if you drop the scheme, you also drop the separator
<wmoxam>
that's actually not valid
<kaneda^>
hold on
<workmad3>
kaneda^: and if you look at the RFC, you'll see that a relative URI starts with //, not ://
<kaneda^>
ahhh, that's my mistakle
<wmoxam>
"A path segment that contains a colon character (e.g., "this:that") cannot be used as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
<wmoxam>
"
skade has joined #ruby-lang
<kaneda^>
my mistake, schemeless is acceptable, i just misread the RFC
<workmad3>
kaneda^: :)
<kaneda^>
thanks guys :)
kaneda^ has quit [Quit: laters]
ando has quit [Ping timeout: 240 seconds]
AKASkip has joined #ruby-lang
bin7me has quit [Quit: Leaving]
mistym has quit [Remote host closed the connection]
ulisescab has quit [Quit: Page closed]
retro_ has quit [Ping timeout: 272 seconds]
ulisescab has joined #ruby-lang
alakra-away is now known as alakra
lfox has quit []
nigerianceo has quit []
lfox has joined #ruby-lang
nigerianceo has joined #ruby-lang
rixth_ has joined #ruby-lang
sinm has joined #ruby-lang
|jemc| has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Remote host closed the connection]
<workmad3>
naquad: if I was worried about multiple passes, I'd do it with an each_with_object but I feel that reduces clarity
gokul has joined #ruby-lang
tbuehlmann has quit [Quit: Konversation terminated!]
badeball has quit [Ping timeout: 272 seconds]
<naquad>
workmad3, your way creates a temporary object, requires second round processing and is much less understandable for someone who is at least a bit aware of ruby std lib
<naquad>
think about it
<havenwood>
naquad: capabilities.each_with_object([]) do |capability, result|
badeball has joined #ruby-lang
<naquad>
havenwood, each_with_object is since 1.9.3 if i don't mind?
<naquad>
or 1.9.0?
<workmad3>
naquad: I am thinking about it
<workmad3>
naquad: and I still see a .select as better than .map.compact
<havenwood>
naquad: 1.9+ so works on all living Rubies
ando_ has quit [Remote host closed the connection]
ando_ has joined #ruby-lang
ando_ has quit [Remote host closed the connection]
<workmad3>
naquad: if you really wanted a one-liner, then capabilities.each_with_object([]) {|cap, result| result << $1 if cap =~ /^AUTH=(.*)=}
ando_ has joined #ruby-lang
<workmad3>
err, / not = at the end there, sorry :)
<naquad>
i've managed to make it even more obscure!
<workmad3>
naquad: but you were asking about ruby idioms... whereby I'd argue that doing a .map.compact.map (for a total of 2 passes over the full array and 1 over the compacted) is less idiomatic than a .select :)
<judofyr>
dostoyevsky: it also ships with Ruby 1.9+
<dostoyevsky>
oh... And it's by "Florian Frank" who wrote fjson...
<judofyr>
dostoyevsky: well, for dumping data as JSON there's two approaches: Build one big Hash and call #to_json, or use something like jBuilder to incrementally build it
<dostoyevsky>
Ah, no wrong
senj has quit [Ping timeout: 252 seconds]
daikan has quit [Remote host closed the connection]
rixth_ has quit [Quit: Computer has gone to sleep.]
ConstantineXVI has quit [Ping timeout: 240 seconds]
duckinator has quit [Ping timeout: 240 seconds]
fijimunkii has quit [Ping timeout: 240 seconds]
perdido has quit [Ping timeout: 240 seconds]
soraher has quit [Ping timeout: 240 seconds]
mitchty has quit [Ping timeout: 240 seconds]
MartynKeigher has quit [Ping timeout: 240 seconds]
DarkBushido has joined #ruby-lang
mitchty has joined #ruby-lang
[_aeris_] is now known as _aeris_
soraher has joined #ruby-lang
DarkBushido is now known as Guest9441
mitchty is now known as Guest17523
bradland has joined #ruby-lang
Guest9441 has quit [Changing host]
Guest9441 has joined #ruby-lang
perdido has joined #ruby-lang
ConstantineXVI has joined #ruby-lang
Paradox has joined #ruby-lang
MartynKeigher has joined #ruby-lang
rixth_ has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
sinm has joined #ruby-lang
<bradland>
i need some help understanding why line 4 of this example discards precision when the other two examples do not: https://gist.github.com/bradland/8303872
<apeiros>
Thread.new do begin …yourcodewhichmaybreakhellloose… rescue => ex end end
<NemesisD>
apeiros: ivve got some code that saves the calling thread and raises to it on connection loss. so in order to prevent it from taking down my main thread i guess i do something like:
<NemesisD>
since the connect does not block. the problem is i was doing this in the main thread so if my conn got dropped it would blow up randomly in the middle of a database call D:
<|jemc|>
didn't read upward enough
<csaunders>
yeah, I have no links... I haven't looked into the langauge/impl though
<csaunders>
maybe that's why? Lack of interest... #speculating
<|jemc|>
heh, who wants to try to keep both ruby and python straight in their heads on the same project?
<|jemc|>
(referring to the core devs)
<apeiros>
NemesisD: it's generally a rather bad idea to raise an exception in a thread
<apeiros>
I mean, from another thread
<apeiros>
i.e., I'd strongly disadvise from using Thread#raise
nisstyre has joined #ruby-lang
breakingthings has quit []
CoreData has joined #ruby-lang
<yorickpeterse>
NemesisD: the only way is to begin/rescue all the things in the thread itself
<NemesisD>
apeiros: yeah. its not my code. i wouldn't do that
<yorickpeterse>
you could probably do `Thread.abort_on_exception = true` and then wrap everything in `begin/rescue` but I'm not sure how that would work
jsullivandigs has quit [Remote host closed the connection]
<apeiros>
NemesisD: can you control which thread the nasty library raises the exception in?
<apeiros>
if so, make a thread with plain sleep in it to "take one for the team" :)
<apeiros>
bait = Thread.new do begin; sleep; rescue NastyException => ex; controlled_shutdown; end; end
<apeiros>
if it's always the main thread, move your operating code into another thread and let the main thread sleep.
danijoo_ has joined #ruby-lang
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
Johz has quit [Quit: Leaving]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
jalcine has quit [Excess Flood]
<NemesisD>
apeiros: yeah so that's what we're doing
<NemesisD>
we silo that thread off into a thread that sleeps forever for the sake of handling this error
<NemesisD>
better it than the main thread
nertzy3 has joined #ruby-lang
shinnya has joined #ruby-lang
jsullivandigs has joined #ruby-lang
jalcine has joined #ruby-lang
toretore has quit [Ping timeout: 272 seconds]
<NemesisD>
woah woah woah
nertzy2 has quit [Ping timeout: 276 seconds]
<NemesisD>
the doc for the instance method abort_on_exception= for thread says it causes all threads including the main thread to abort if an exception is raised in this thread, but that doesn't appear to be true at all
<NemesisD>
really it just seems to throw an exception to the calling thread when that thread aborts
arBmind has quit [Ping timeout: 252 seconds]
<NemesisD>
waat
<yorickpeterse>
NemesisD: what problem are you trying to solve?
dingus_khan has quit [Remote host closed the connection]
<apeiros>
NemesisD: errr, no? that doc is spot on.
<apeiros>
NemesisD: note though that it's about *unhandled* exceptions
<apeiros>
that said, last I tested that was in 1.8…
<NemesisD>
i'm no longer trying to solve a problem, just questioning the docs. let me paste my test
<yorickpeterse>
NemesisD: that's because you set the abort_on_exception_flag when the first thread might be done already
<NemesisD>
the docs even go so far as to say that the process will effectively exit(0), which it doesn't at all. also why would it exit with 0 if its an unhandled exception
<NemesisD>
yorickpeterse: i deliberately sleep in the first thread for a second
<yorickpeterse>
that doesn't guarantee anything
<yorickpeterse>
use `Thread.abort_on_exception = true` (the literal global form)
<yorickpeterse>
and set it first
<NemesisD>
that's not the functionality i'm testing though. i'm testing the instance version
<yorickpeterse>
you'd have to call it as soon as possible, so directly after creating the thread
<yorickpeterse>
or in the thread itself
<NemesisD>
ok sure ill do Thread.current.abort_on_exception
<NemesisD>
same behavior
dingus_khan has joined #ruby-lang
<yorickpeterse>
Thread.new { raise 'foo' }.abort_on_exception = true # something like this should work
<NemesisD>
yeah but the boom raises and gets caught in that exception handler
<NemesisD>
i see blast shielded: BOOM in the console
<NemesisD>
and then BOOM that kills the program when i join
iliketurtles has quit [Quit: zzzzz…..]
deens has joined #ruby-lang
diegoviola has quit [Ping timeout: 252 seconds]
fijimunkii has quit [Read error: Connection reset by peer]
<NemesisD>
*cue bill oreilly saying you can't explain that*
<yorickpeterse>
granted it's late, seems like begin/rescue here rescues the exception in the main thread
<yorickpeterse>
oh wait
<yorickpeterse>
it rescues it, somehow, but then still continues
<NemesisD>
yeah
<NemesisD>
also join always seems to raise unhandled exceptions in child threads
<NemesisD>
so it seems like abort_on_exception = true raises in the calling thread any time an exception goes unhandled in that thread
vlad_starkov has quit [Remote host closed the connection]
<NemesisD>
but "When se to true, causes all threads (including the main program) to abort if an exception is raised in thr. The process will effectively exit(0)" *appears* to be completely wrong
<NemesisD>
it does not abort all the threads like the docs said. it is completely recoverable. it also doesn't exit(0)
joshcooper has left #ruby-lang [#ruby-lang]
bjh13 has quit [Quit: leaving]
<yorickpeterse>
oh wait, I see
<yorickpeterse>
when you use Thread.abort_on_exception it uses the current (= main thread) so that when an exception occurs it will terminate that one
<yorickpeterse>
Probably if you use it on another thread it only terminates that one
<NemesisD>
let me know when i can flip over my table and say the stdlib docs are a lie
<yorickpeterse>
probably
seanlinsley has joined #ruby-lang
mrevd has quit [Quit: Leaving.]
dvarrui has joined #ruby-lang
kurko______ has quit [Ping timeout: 252 seconds]
alex-quiterio has joined #ruby-lang
<NemesisD>
(╯°□°)╯︵ ┻━┻
<mistym>
╯°□°╯︵sɔop
derpmaster12387 has left #ruby-lang [#ruby-lang]
<NemesisD>
where do the ruby docs live? i feel like i should create a PR for this
<drbrain>
NemesisD: you can create a pull request on ruby/ruby
<drbrain>
NemesisD: you'll probably find the offending documentation in thread.c
jalcine is now known as jacky
panpainter has quit [Remote host closed the connection]
<NemesisD>
cool cool
diegoviola has joined #ruby-lang
<NemesisD>
drbrain: i'm actually not sure what the correct doc is here. i assume i have to open a bug somewhere, but i don't have access to open issues on buugs.ruby-lang.org
<NemesisD>
oh ok maybe i need a login. that makes sense
<drbrain>
yes, you need a login
<NemesisD>
hehe
ivanskie has joined #ruby-lang
<drbrain>
because some issues required feedback (and spam)
<NemesisD>
cool. i'll follow up on this after work. thanks guys
benanne has quit [Quit: kbai]
ando_ has joined #ruby-lang
nigerianceo has quit []
AKASkip has quit [Ping timeout: 260 seconds]
nathanstitt has quit [Quit: I growing sleepy]
kitak has joined #ruby-lang
MrZYX is now known as MrZYX|off
vlad_starkov has joined #ruby-lang
panpainter has joined #ruby-lang
enebo has quit [Quit: enebo]
vlad_starkov has quit [Read error: Connection reset by peer]
dingus_khan has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
retro_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ando_ has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
danijoo has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
ando has quit [Remote host closed the connection]
ando has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 276 seconds]
dvarrui has quit [Ping timeout: 246 seconds]
stonerfish has quit [Quit: Leaving.]
stonerfish has joined #ruby-lang
stonerfish has quit [Client Quit]
Mon_Ouie has quit [Read error: Operation timed out]
symm- has joined #ruby-lang
stonerfish has joined #ruby-lang
stonerfish has quit [Client Quit]
<Veejay>
Hi, I was wondering, since 2.0 was a major release, should I expect code to break if I'm still using 1.9.3p484?
<CoverSlide>
Veejay: TIAS
<Veejay>
I've looked at changelogs but they usuaally refer to what's been added since the last version, not always easy to get a sense of change over a few years
ulisescab has quit [Ping timeout: 272 seconds]
<Veejay>
CoverSlide: I'm not familiar with this acronym sorry
<CoverSlide>
try it on your app and see
<Veejay>
Unless you're referring to The Internet Antique Shop