<heyhey>
i was just trying to use assignment and then trying to parase through the information so I can could the most chars? no idea its sloppy and awful I know
<zenspider>
it's not sloppy... it's totally incomplete. that doesn't even parse.
<heyhey>
lol
<heyhey>
fuck
<zenspider>
not lol. we're not gonna do your homework for you. You need to show some effort and be asking specific questions about problems you're having.
toastynerd has joined #ruby-lang
<centrx>
At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
yfeldblum has quit [Remote host closed the connection]
<heyhey>
haha
yfeldblum has joined #ruby-lang
<zenspider>
canadian? damn... and I thought you were a lazy american college/HS student.
mehlah has quit [Quit: Leaving...]
<zenspider>
time for me to head off to my study group... where I actually did my own work.
toastynerd has quit [Ping timeout: 264 seconds]
creede has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby-lang
<centrx>
+1 for learning it yourself
toastynerd has joined #ruby-lang
creede has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
<heyhey>
soooo I just use a method to go through information?
<andrewvos>
I don't think these classes get loaded until I use them
drx_ has joined #ruby-lang
<yorickpeterse>
oh yeah
sdouglas has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
rolfb has joined #ruby-lang
<andrewvos>
NOOOOOOOO
ahf has quit [Ping timeout: 264 seconds]
michd is now known as MichD
arBmind1 has quit [Quit: Leaving.]
mr-foobar has quit [Remote host closed the connection]
jsutt has joined #ruby-lang
_elia has quit [Remote host closed the connection]
elia has joined #ruby-lang
mr-foobar has joined #ruby-lang
vlad_starkov has joined #ruby-lang
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
mr-foobar has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby-lang
<zenspider>
andrewvos: it's pretty useless anyhow, since it is done at the time of the class X < Y line, not at the end (when it has all its stuff in it that you might want to play with)
<zenspider>
drives me bonkers. I wish we had a hook for the end of the subclass' block
drx___ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
<andrewvos>
zenspider: Yeah I'm going to just have to hardcode a list of class names I think :/
<andrewvos>
zenspider: What I actually have is this: class Notification... class FacebookNotification < Notification
<andrewvos>
And in the Notification class I want to get a list of Notification classes that are supported
<andrewvos>
I suppose inherited would work, because I am only storing the type of class
<andrewvos>
But yeah, I still would need to manually require each file to get around rails being crazy
chouhoulis has quit [Remote host closed the connection]
<zenspider>
is this for a plugin system, or are you just being lazy?
<zenspider>
luckily for you, bundler has this lovely "feature" that requires the default lib file for you...
<zenspider>
one more reason bundler should be burned to the ground
Atw has quit [Ping timeout: 240 seconds]
drx___ has quit [Ping timeout: 264 seconds]
<andrewvos>
zenspider: Nah this is just for an app in rails. I have a whole lot of notifications that the user can get by email, and eaach one is its own class
drx_ has joined #ruby-lang
<andrewvos>
zenspider: And I want to show a settings page where you can disable certain notification types
<andrewvos>
zenspider: So I need a list of supported notifications
<andrewvos>
zenspider: And I don't want to hardcode them in there
<andrewvos>
(if I don't have to)
jsutt has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
drx_ has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
drx_ has joined #ruby-lang
devgiant has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
jsutt has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx___ has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
ecnalyr has joined #ruby-lang
<zenspider>
andrewvos: I'd force it via require then
<zenspider>
ok. need to pack for MWRC and get to bed.
arBmind has joined #ruby-lang
<maloik>
mwrc ?
robmiller has joined #ruby-lang
ItSANgo has quit [Quit: Leaving...]
drx_ has joined #ruby-lang
jsutt has quit [Ping timeout: 240 seconds]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
<threeifbywhiskey>
The Mountain West Ruby Conference.
jsutt has joined #ruby-lang
nathanstitt has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
<maloik>
oh right
nathanstitt has quit [Ping timeout: 240 seconds]
kitak has quit [Remote host closed the connection]
jsutt has quit [Ping timeout: 240 seconds]
jsutt has joined #ruby-lang
vpretzel has joined #ruby-lang
drx_ has joined #ruby-lang
vpretzel has quit [Ping timeout: 246 seconds]
Speed has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
jsutt has quit [Ping timeout: 246 seconds]
drx_ has joined #ruby-lang
drx___ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
matcouto has joined #ruby-lang
drx___ has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx___ has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
Fushi has joined #ruby-lang
drx_ has joined #ruby-lang
mr-foobar has joined #ruby-lang
drx___ has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
drx_ has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby-lang
mr-foobar has quit [Ping timeout: 240 seconds]
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
drx___ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
jsutt has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
woollyams has joined #ruby-lang
phansch has quit [Ping timeout: 240 seconds]
drx___ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
jsutt has quit [Ping timeout: 264 seconds]
drx___ has quit [Read error: Connection reset by peer]
khaase_ has joined #ruby-lang
rahul_j has quit [Ping timeout: 240 seconds]
drx_ has joined #ruby-lang
rahul_j has joined #ruby-lang
Gabri has quit [Quit: Gone to sleep. ZZZzzz…]
khaase has quit [Ping timeout: 246 seconds]
drx___ has joined #ruby-lang
khaase_ has quit [Ping timeout: 240 seconds]
drx___ has quit [Read error: Connection reset by peer]
threeifbywhiskey has left #ruby-lang [#ruby-lang]
nathanstitt has joined #ruby-lang
drx_ has quit [Ping timeout: 246 seconds]
havenwood has quit [Remote host closed the connection]
woollyams has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby-lang
nathanstitt has quit [Ping timeout: 240 seconds]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
drx_ has joined #ruby-lang
rofel has joined #ruby-lang
drx___ has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
vpretzel has joined #ruby-lang
drx_ has quit [Ping timeout: 246 seconds]
elia has quit [Quit: Computer has gone to sleep.]
Gabri has joined #ruby-lang
vpretzel has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby-lang
phansch has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
jsutt has joined #ruby-lang
jsutt has quit [Max SendQ exceeded]
DEac-_ has joined #ruby-lang
havenwood has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
havenwood has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
drx_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
jsutt has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
Xzyx987X has joined #ruby-lang
phansch has quit [Quit: WeeChat 0.4.2]
Gabri has quit []
havenwood has quit [Remote host closed the connection]
Xzyx987X_ has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
tonni has quit [Remote host closed the connection]
drx_ has joined #ruby-lang
knu has quit [Remote host closed the connection]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
andrewvos has left #ruby-lang ["WeeChat 0.4.0"]
rahul_j has quit [Quit: rahul_j]
knu has joined #ruby-lang
khaase has quit [Read error: Connection reset by peer]
enebo has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
drx_ has joined #ruby-lang
alexju has joined #ruby-lang
khaase has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
dik_dak has joined #ruby-lang
alexju has quit [Remote host closed the connection]
drx___ has joined #ruby-lang
drx_ has quit [Ping timeout: 246 seconds]
drx___ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
[spoiler] has joined #ruby-lang
Gabri has joined #ruby-lang
Gabri has quit [Max SendQ exceeded]
drx_ has joined #ruby-lang
nathanstitt has joined #ruby-lang
anannie has joined #ruby-lang
anannie has joined #ruby-lang
anannie has quit [Changing host]
drx_ has quit [Read error: Connection reset by peer]
jsutt has joined #ruby-lang
jsutt has quit [Max SendQ exceeded]
bradcliffe has joined #ruby-lang
jsutt has joined #ruby-lang
nathanstitt has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby-lang
cnivolle has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
mykoweb has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 246 seconds]
kiddorails has joined #ruby-lang
sdouglas has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
jsutt has quit [Ping timeout: 240 seconds]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
AncientAmateur has quit [Remote host closed the connection]
AncientAmateur has joined #ruby-lang
drx_ has joined #ruby-lang
tylersmith has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
vpretzel has quit [Quit: Adios!]
sdouglas has quit [Remote host closed the connection]
relix_ has joined #ruby-lang
sdouglas has joined #ruby-lang
vpretzel has joined #ruby-lang
relix has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
drx_ has joined #ruby-lang
osef_ has joined #ruby-lang
<osef_>
a
chouhoulis has joined #ruby-lang
sdouglas has quit [Ping timeout: 240 seconds]
<osef_>
Hi there, I would like know where the "require" method is defined (Ruby 1.9.3) and where I can find this file in my Ruby directory ? (Linux OS). Thanks :)
drx_ has quit [Read error: Connection reset by peer]
<osef_>
But it must be somehow be implemented in Ruby, isn't it ? What file contains the def require (some parameters), used when I require a module in my Ruby programs ?
drx_ has quit [Read error: Connection reset by peer]
<yorickpeterse>
The above file
drx_ has joined #ruby-lang
<yorickpeterse>
MRI "binds" this to Ruby land using a the C API
<yorickpeterse>
SURPRISE: THE INPUT HASH IS ALREADY A HASH
<yorickpeterse>
as in, :ratings is basically {:foo => :bar}
Lewix has quit [Remote host closed the connection]
<mlangenberg>
Can you find a better way to convert the number 201411 to the last day of that week? Date.commercial(*/(\d{4})(\d{2})/.match('201411').captures.map(&:to_i), 7)
<threeifbywhiskey>
It's just a fun little mental excursion I'm on as of late. For the hack of it.
<yorickpeterse>
#<< is already used in Ruby in a bunch of cases
<yorickpeterse>
e.g. Array#<<
<threeifbywhiskey>
Yes, I know.
<yorickpeterse>
(alias for Array#push)
eam has joined #ruby-lang
<threeifbywhiskey>
And also for shoveling characters and codepoints into strings.
<threeifbywhiskey>
And even File-like objects like $>.
<threeifbywhiskey>
We can do everything in Ruby without using numbers or letters except simulate Kernel#gets.
<badeball>
threeifbywhiskey: you know that you can define a method named '>>' if you want to?
<threeifbywhiskey>
No, "def" contains three letters.
wallerdev has joined #ruby-lang
<badeball>
really?
<threeifbywhiskey>
Indeed.
<threeifbywhiskey>
It's an alphanumeric string that can't be used in a non-alphanumeric program.
<threeifbywhiskey>
#rocketscience
<toretore>
threeifbywhiskey: what you're proposing is completely unnecessary and will only be confusing
<badeball>
threeifbywhiskey: it was an answer to your first question
<threeifbywhiskey>
toretore: Yes, that much I understand.
<toretore>
so then the answer to the question "Would a patch just get shot right down?" should be obvious
<threeifbywhiskey>
It's odd that no single other person I've talked to about this wants to beat Perl at their own game.
<toretore>
nobody cares about it
<threeifbywhiskey>
I know. :(
<threeifbywhiskey>
What happened to the Array#forty_two spirit? :/
<threeifbywhiskey>
Because we can.
<toretore>
it never existed
<toretore>
it was a joke
<threeifbywhiskey>
It's still in Rails.
<toretore>
rails != ruby
<threeifbywhiskey>
Y'got me.
agarie has quit [Ping timeout: 240 seconds]
<threeifbywhiskey>
_why would've loved it.
<toretore>
_why != ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<threeifbywhiskey>
You have to use the lambda calculus to write substantial non-alphanumeric programs, and I'm finally starting to wrap my head around it because I'm practicing it in Ruby.
<threeifbywhiskey>
I realize a lot of people have seen Programming with Nothing, which makes Programming with Nothing but Symbols look boring and pedantic by comparison.
richardardrichar has joined #ruby-lang
QuintinAdam has joined #ruby-lang
<threeifbywhiskey>
Still fun, though.
<toretore>
nobody wants to program without alphanumerics in real life
<threeifbywhiskey>
Is this real life?
<toretore>
if you like the challenge, then that's fine, but it's not something people want in their day to day code
<threeifbywhiskey>
Putting it on Object seems cruel.
<threeifbywhiskey>
It only needs to go on String, Symbol, and Array, but I mean, one method instead of three, 'ey?
yfeldblum has quit [Remote host closed the connection]
<threeifbywhiskey>
That should be "other.send *self", by the way, to permit passing arguments to #send as the all-but-first elements of the array on the LHS.
<threeifbywhiskey>
Such that `[:+, 2] >> 2` is 4.
<threeifbywhiskey>
*more arguments, I suppose.
skade has quit [Client Quit]
vlad_starkov has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
<threeifbywhiskey>
*all-but-zeroth; Dijkstra would not be proud.
<ljarvis>
Double checking grep used === commenting on a basecamp issue and I'm on my phone
<ljarvis>
Omakase
<centrx>
>> :2
<eval-in>
centrx => /tmp/execpad-204232f3461e/source-204232f3461e:2: syntax error, unexpected tINTEGER, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (https://eval.in/123314)
Who has joined #ruby-lang
amsi has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
Oloryn_lt2 has quit [Client Quit]
<threeifbywhiskey>
Is Shift-123 pronounced "bang-at-pound" or "whack-at-crunch"?
dingus_khan has quit [Remote host closed the connection]
eam has joined #ruby-lang
skade has joined #ruby-lang
fezziwig has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
fezziwig has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
skade has quit [Ping timeout: 265 seconds]
Coincidental has quit [Remote host closed the connection]
fezziwig has quit [Ping timeout: 269 seconds]
postmodern has quit [Quit: Leaving]
ledestin has joined #ruby-lang
postmodern has joined #ruby-lang
shevy has left #ruby-lang ["I'll be back ... maybe"]
eam has quit [Ping timeout: 240 seconds]
eam has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
rofel has joined #ruby-lang
vivekrai has quit [Quit: Connection closed for inactivity]
<pipework>
threeifbywhiskey: Or bang-at-crunch.
benanne has quit [Ping timeout: 246 seconds]
Coincidental has joined #ruby-lang
kirin` has quit [Ping timeout: 246 seconds]
<toretore>
what
<threeifbywhiskey>
toretore: How do you pronounce "!@#"?
* centrx
only sees the incredulity on one side of this conversation
kirin` has joined #ruby-lang
<havenwood>
threeifbywhiskey: bang at hash
<toretore>
exclamation mark, at sign, pound sign
<threeifbywhiskey>
toretore: A man of the classics.
rofel has quit [Ping timeout: 265 seconds]
<toretore>
as in, it shouldn't be pronounced
<pipework>
havenwood: Shame shame!
<pipework>
Bang-at-octothorpe.
<havenwood>
pipework: good point!!
<havenwood>
an octothorpe it is...
<pipework>
verily
<threeifbywhiskey>
Somebody recommended we call the + a tetrathorpe.
<havenwood>
threeifbywhiskey: seems like a quadrathorpe to me
<threeifbywhiskey>
Octa- and tetra- are the Greek.
<threeifbywhiskey>
Quad- is Latin, unless I'm mistaken.
<havenwood>
threeifbywhiskey: yup, we're in Greek, i'm wrong
<havenwood>
ὀκτώ
<threeifbywhiskey>
It'd never fly, anway; we wouldn' be able to differentiate from + from ×.
<threeifbywhiskey>
*anyway
<havenwood>
tetracopters unite!
creede has quit [Ping timeout: 240 seconds]
<threeifbywhiskey>
That is a beautiful word.
<threeifbywhiskey>
"7 tetracopter 2 is 14".
toastynerd has quit [Remote host closed the connection]
AncientAmateur has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
benanne has joined #ruby-lang
toastynerd has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
devgiant_ has joined #ruby-lang
rofel has joined #ruby-lang
devgiant has quit [Ping timeout: 240 seconds]
* jaimef
hates dealing with rubydevs who use non-standard identation that do not follow the Mats standard implementation as defined by ;; ;;; ruby-mode.el --- Major mode for editing Ruby files Authors: Yukihiro Matsumoto Created: Fri Feb 4 14:49:13 JST 1994
havenwood has quit [Ping timeout: 240 seconds]
creede has joined #ruby-lang
Who has quit [Quit: Who]
<ljarvis>
lol 1994
confounds_afk has quit []
<yorickpeterse>
BACK IN THE DAY!!!
robmiller has quit [Quit: Leaving.]
QuintinAdam has joined #ruby-lang
_ht has quit [Remote host closed the connection]
agarie_ has quit [Remote host closed the connection]
yubrew has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
yubrew has joined #ruby-lang
yubrew has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
sdouglas has quit [Read error: Connection reset by peer]
robmiller has joined #ruby-lang
robmiller has quit [Client Quit]
sdouglas has joined #ruby-lang
<apeiros>
jaimef: you mean all the code which doesn't use 1 tab for 8 spaces and 2 spaces otherwise? :)
wallerdev has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
dingus_khan has joined #ruby-lang
anannie has quit [Remote host closed the connection]
QuintinAdam has quit [Ping timeout: 265 seconds]
sdouglas has quit [Remote host closed the connection]
dingus_khan has quit [Ping timeout: 240 seconds]
fezziwig has joined #ruby-lang
sdouglas has joined #ruby-lang
workmad3 has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
Hobogrammer has quit [Ping timeout: 240 seconds]
woollyams has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
apeiros has quit [Ping timeout: 246 seconds]
anannie has joined #ruby-lang
jsullivandigs has quit [Quit: Leaving...]
bjh13 has quit [Quit: leaving]
toastynerd has quit [Remote host closed the connection]
fezziwig has quit [Remote host closed the connection]
mr-foobar has quit [Remote host closed the connection]
fezziwig has joined #ruby-lang
mr-foobar has joined #ruby-lang
toastynerd has joined #ruby-lang
skade has joined #ruby-lang
fezziwig has quit [Read error: Connection reset by peer]
fezziwig has quit [Remote host closed the connection]
fezziwig has joined #ruby-lang
centrx has quit [Quit: All this computer hacking is making me thirsty]
dilated_dinosaur has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has joined #ruby-lang
momomomomo has joined #ruby-lang
enebo has quit [Quit: enebo]
cnivolle has quit []
solars has quit [Ping timeout: 246 seconds]
momomomomo has quit [Client Quit]
yubrew has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby-lang
nathanstitt has joined #ruby-lang
hackeron has quit [Remote host closed the connection]
dik_dak has quit [Ping timeout: 240 seconds]
hackeron has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
arBmind has quit [Quit: Leaving.]
tbuehlmann has quit [Remote host closed the connection]
Coincidental has quit [Remote host closed the connection]
symm- has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has joined #ruby-lang
Coincidental has joined #ruby-lang
skade has joined #ruby-lang
agarie has joined #ruby-lang
michaeldeol has joined #ruby-lang
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
vlad_starkov has joined #ruby-lang
|jemc| has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby-lang
VTLob has quit [Quit: VTLob]
vlad_starkov has quit [Ping timeout: 264 seconds]
jhass is now known as jhass|off
<pipework>
threeifbywhiskey: What's greek for 4 then?
<pipework>
Is it tetra? TIL
<pipework>
jaimef: Link or gtfo
daturkel has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
<daturkel>
quick question. "open-uri" lets you use the 'open' method on a url string to return its contents, is there a way to raise an exception if it produces a socket error (invalid url)?
<daturkel>
(or dead site)
<daturkel>
or generally just make an if statement on the condition that it returns an error
<pipework>
daturkel: Have you tried using 'raise'?
yubrew has joined #ruby-lang
creede has quit [Ping timeout: 240 seconds]
<daturkel>
i don't know how to here because i don't know what condition to check
ruby-lang968 has joined #ruby-lang
<ruby-lang968>
Hello, I'm new to this chat room and to Ruby...I'm constantly getting a LoadError when i try to use the require method
<ruby-lang968>
I'm wondering if anybody can assist me
Coincidental has quit [Remote host closed the connection]
<centrx>
daturkel, Doesn't it do that already?
yubrew has quit [Ping timeout: 240 seconds]
<centrx>
ruby-lang968, Use gist.github.com to post code
<daturkel>
centrx: right now, if you feed it an invalid url (that is, well-formed, but not directed to a file), it throws a SocketError. i want to be able to make an if-statement on this socketerror, like "if this is about to fail"
fezziwig has quit [Remote host closed the connection]
<centrx>
daturkel, Use "rescue"
fezziwig has joined #ruby-lang
<centrx>
daturkel, And you can raise any other exception inside the rescue
<daturkel>
ah, that works. thank you
<centrx>
ruby-lang968, Post the URL of your gist in the channel
<centrx>
ruby-lang968, Welcome to IRC
<bnagy>
daturkel: remember that you can also rescue specific exceptions, like rescue SocketError; #stuff; rescue RaveningZombies; #other; rescue; #everything else