Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
LittleBill902 joined #ruby
rsampaio joined #ruby
dankest joined #ruby
Banistergalaxy joined #ruby
kevinbond joined #ruby
rmc3 joined #ruby
beakerman joined #ruby
LittleBill902 joined #ruby
Seisatsu joined #ruby
banisterfiend joined #ruby
replore_ joined #ruby
zenergi joined #ruby
stkowski joined #ruby
robotmay joined #ruby
hasrb joined #ruby
Evanescence joined #ruby
Manhose joined #ruby
Evanescence left #ruby
Draco_ joined #ruby
rsampaio joined #ruby
developish joined #ruby
cooper joined #ruby
rebagliatte joined #ruby
ryanf joined #ruby
philcrissman joined #ruby
jarjar_prime joined #ruby
ontehfritz joined #ruby
CannedCorn joined #ruby
LittleBill902 joined #ruby
fujimura joined #ruby
rebaglia_ joined #ruby
bwlang joined #ruby
Kiall joined #ruby
LittleBill902 joined #ruby
<jbhewitt>
hey guys i'm trying to install the mysql gem on my mac - however I don't have the mysql-devel package on my machine… i'm using homebrew and can't seem to find it
<ryanf>
jbhewitt: did you install mysql itself with homebrew? I think the -devel thing is an artifact of certain package managers that separate the development headers out from the main package
<jbhewitt>
ryanf yes i installed mysql with hombrew… still no luck
<jbhewitt>
keeps throwing up "You have to install development tools first." when i try gem install mysql
<ryanf>
this might be a good question for #homebrew actually
<ryanf>
or you might just need to tell gem install where the headers are, but I don't know what flags you would need exactly
marknyc joined #ruby
Kiall joined #ruby
<jbhewitt>
ok figured it out - gem install mysql -- \ --with-mysql-config=/usr/local/bin/mysql_config
Clooth joined #ruby
dv310p3r joined #ruby
TheMoonMaster_ joined #ruby
<sean_m>
Does anyone know how to read/parse pst files?
<moshee>
what's the difference between putting classes inside another class and putting them in a module?
minijupe joined #ruby
<shevy>
moshee I think there is not that much of a difference ... I've seen both. Personally I prefer a top-module namespace, it feels odd to do:
<shevy>
class Foo
<shevy>
class Bar
<moshee>
yeah that is weird to me too
<bjorkintosh>
shevy, haha. funny you said that...
<shevy>
apeiros uses that :(
<bjorkintosh>
class Pry
<bjorkintosh>
class Hooks
<bjorkintosh>
right there!
<bjorkintosh>
in hooks.rb :)
<shevy>
hehe
<shevy>
seems to be a common pattern
<shevy>
you can scope to Hooks either way, Foo::Hooks.new independent of whether Foo is a class or module
pen_isident joined #ruby
<banisterfiend>
bjorkintosh: i didnt see a reason to make it a module in that case, and i liked Pry.new instead of Pry::Session.new too, but it's not a big deal either way
<bjorkintosh>
banisterfiend, did you write pry?
<banisterfiend>
bjorkintosh: yeah
<bjorkintosh>
oh great! you should have recommended it then :)
<banisterfiend>
well i have some help now :)
<bjorkintosh>
'cause i'm reading it anyway!
<banisterfiend>
bjorkintosh: it does some pretty weird stuff im not sure it's a good codebase to learn from
<bjorkintosh>
what would you recommend otherwise?
<banisterfiend>
bjorkintosh: something simpler and more straightforward, maybe slop or minitest
<banisterfiend>
or bacon
<banisterfiend>
or even ripl
J__ joined #ruby
<banisterfiend>
bjorkintosh: though you can learn somet prett interesting things about Bindings reading the pry code i guess ;)
<moshee>
pry is pretty cool lol
<banisterfiend>
we also use some neat tricks for catching exceptions
<moshee>
I actually have it open right now
<bjorkintosh>
moshee, so do i!
<bjorkintosh>
banisterfiend, at least two people have pry open right now :D isn't that something?
<Axsuul>
would adding methods to String affect performance?
nanoyak joined #ruby
radic_ joined #ruby
mengu joined #ruby
luckyruby joined #ruby
wyhaines joined #ruby
dv310p3r joined #ruby
<RyanV>
anyone there?
<RyanV>
here
nnisi joined #ruby
mengu joined #ruby
mengu joined #ruby
Beoran_ joined #ruby
acts_as_david joined #ruby
rsampaio joined #ruby
baroquebobcat joined #ruby
asuka_ joined #ruby
derekbarber joined #ruby
<advorak>
RyanV, yes? :-)
acts_as_david joined #ruby
Backsorry joined #ruby
Backsorry joined #ruby
sdwrage joined #ruby
mxweas_ joined #ruby
pabloh joined #ruby
<shevy>
RyanV noone is here
<RyanV>
hi
<RyanV>
i figured out the question i had, but i actually have another regarding regular expressions
rodayo joined #ruby
<RyanV>
using regexp, how can i match just the word characters of a string that might look like this "Here is text (12345567)"
ksinkar joined #ruby
<rodayo>
Is there a short hand for finding which iteration you're on in a block? If I'm not doing an indexed count, I may still need access to the index
<rodayo>
RaynV: maybe I'm not understanding you but if you want each individual alphabetic character it should be /\w/ and you use the scan method on a string to find all the matches...
<rodayo>
sorry looks like \w would include numbers too; i guess it would be /[A-Za-z]/ - the old lex regexps
__Genji_Richmond joined #ruby
yxhuvud joined #ruby
Asher joined #ruby
P4P4jUL137 joined #ruby
yxhuvud joined #ruby
kawa_xxx joined #ruby
bluOxigen joined #ruby
Draco_ joined #ruby
rup3rt joined #ruby
moted joined #ruby
tyman joined #ruby
<RyanV>
what ruby method will allow me to remove a character or string from a larger string
ksinkar left #ruby
havenn joined #ruby
LittleBill902 joined #ruby
brownies joined #ruby
<burgestrand>
RyanV: String#delete or String#sub or String#gsub depending on what you want to do
jensn joined #ruby
<burgestrand>
Oh, yeah; String#[]= too… there’s probably more \o/
<RyanV>
hmm
<RyanV>
in this case it was actually easier to just split the string at a certain special character than choose first
<RyanV>
but thanks
rgrinberg joined #ruby
Clooth joined #ruby
asuka_ joined #ruby
p0y joined #ruby
mxweas_ joined #ruby
marting_ joined #ruby
robyurkowski joined #ruby
hasrb joined #ruby
hasrb_ joined #ruby
TMM_ joined #ruby
TMM_ joined #ruby
TMM_ left #ruby
TMM_ joined #ruby
stephenjudkins joined #ruby
sqbell joined #ruby
stephenjudkins joined #ruby
JohnBat26 joined #ruby
heftig joined #ruby
iori joined #ruby
djdb joined #ruby
RLa joined #ruby
stephenjudkins left #ruby
stephenjudkins joined #ruby
QaDeS joined #ruby
speggey joined #ruby
onisen joined #ruby
jankly joined #ruby
<jankly>
Is it possible to progress the position in a string if doing string.each_char inside the do loop?
mxweas_ joined #ruby
p1d joined #ruby
qiyong joined #ruby
<qiyong>
should I use bundle?
<drizz>
yes
<qiyong>
drizz: everyone uses it?
<drizz>
pretty much, yes
<qiyong>
what is it ?
<qiyong>
i don't see an equivelant in traditon
<drizz>
that's because there is none
robotmay joined #ruby
<drizz>
bundler lets you bundle your ruby application with specific versions of each gem, creating a gemset
kaos070 joined #ruby
<drizz>
that way you're sure your app wont break because of a gem update
<kaos070>
nice to see everyone is up.
<kaos070>
need to end a debate here. rubygame or gosu? Which is the most less pain to code for a game?
<kaos070>
anyone?
marting_ joined #ruby
<qiyong>
drizz: won't break on users sites?
<qiyong>
or developers'
RomD joined #ruby
mafolz joined #ruby
zommi joined #ruby
ph^ joined #ruby
Morkel joined #ruby
robyurkowski joined #ruby
Natch| joined #ruby
eft joined #ruby
emptyflask joined #ruby
abstrusenick joined #ruby
<qiyong>
is merb used?
workmad3 joined #ruby
prtksxna joined #ruby
<qiyong>
bundler depends on gems?
bigkm joined #ruby
pi3r joined #ruby
Mahoek joined #ruby
apeiros_ joined #ruby
_debo joined #ruby
a_a_g joined #ruby
ph^_ joined #ruby
dnjaramba joined #ruby
smgt joined #ruby
mxweas_ joined #ruby
Dreamer3__ joined #ruby
petschbot_ joined #ruby
Mchl joined #ruby
MissionCritical joined #ruby
berkes joined #ruby
a_a_g joined #ruby
stephenjudkins joined #ruby
Manhose joined #ruby
LittleBill902 joined #ruby
probst joined #ruby
p0y joined #ruby
manizzle joined #ruby
nanoyak joined #ruby
twist_ joined #ruby
petschbot_ joined #ruby
petschbot_ left #ruby
petschbot_ joined #ruby
michael_imac joined #ruby
cyri_ joined #ruby
apeiros_ joined #ruby
_debo joined #ruby
xec joined #ruby
danielpunt joined #ruby
trivol joined #ruby
thecreators joined #ruby
fortysixandtwo joined #ruby
james_cotterill joined #ruby
Deiu joined #ruby
Deiu joined #ruby
Deiu joined #ruby
Deiu joined #ruby
Deiu left #ruby
JohnBat26 joined #ruby
relix_ joined #ruby
r0bby joined #ruby
relix joined #ruby
_dv_ joined #ruby
dpritchett_ joined #ruby
rpgsimmaster joined #ruby
jbpros joined #ruby
Axsuul joined #ruby
alienvenom joined #ruby
xpot joined #ruby
kalusn joined #ruby
dnyy joined #ruby
ephemerian joined #ruby
ammar01 joined #ruby
james_cotterill joined #ruby
burgestrand joined #ruby
Shrink joined #ruby
mikalv joined #ruby
petschbot_ joined #ruby
BiHi joined #ruby
hurikhan|Work joined #ruby
berkes joined #ruby
stoffus joined #ruby
<stoffus>
is there a shorthand, like ".throws_exception?"? I have the following code https://gist.github.com/fe0d0ca7d32b895b7a70 which returns an exception if not logged in, and a string when logged in. it would be nice with a oneliner :)
jbw joined #ruby
workmad3 joined #ruby
ph^ joined #ruby
Codif joined #ruby
a_a_g joined #ruby
a_a_g joined #ruby
james_cotterill joined #ruby
EddieS joined #ruby
adambeynon joined #ruby
mxweas_ joined #ruby
a_a_g joined #ruby
trivol joined #ruby
_debo joined #ruby
iocor joined #ruby
mikewintermute joined #ruby
samuel02 joined #ruby
mrpanda joined #ruby
mengu joined #ruby
rb2k joined #ruby
mrpanda joined #ruby
ramusara joined #ruby
tk_ joined #ruby
Hellojer_ joined #ruby
samnumbertwo joined #ruby
jbpros joined #ruby
jbpros joined #ruby
zanaga joined #ruby
cdepue joined #ruby
Hellojere joined #ruby
Hellojer_ joined #ruby
james_cotterill joined #ruby
jbpros joined #ruby
Silker joined #ruby
no-name- joined #ruby
manizzle joined #ruby
tayy joined #ruby
Manhose_ joined #ruby
RyanV left #ruby
Maya-PSK joined #ruby
josephwilk joined #ruby
includex joined #ruby
petschbot joined #ruby
jbpros joined #ruby
randym joined #ruby
fermion joined #ruby
manizzle joined #ruby
Codif joined #ruby
gonglexin joined #ruby
Codif joined #ruby
hinogi joined #ruby
hinogi joined #ruby
Manhose__ joined #ruby
Vendethiel joined #ruby
<Afal>
stoffus: try using "method_defined?"
nari_ joined #ruby
fayimora joined #ruby
<Afal>
so: @client.method_defined?(:isConnected) ? @client.isConnected : false
<banisterfiend>
Afal: is @client a class or an instance
<Afal>
I do not know to be fair the gist from stoffus didn't specify
sepp2k joined #ruby
<banisterfiend>
method_defined? only works on classes/modules anyway
emptyflask joined #ruby
Telling joined #ruby
randym_ joined #ruby
akem joined #ruby
Clooth joined #ruby
araujo joined #ruby
shutchie joined #ruby
Helius joined #ruby
king313 joined #ruby
king313 joined #ruby
<apeiros_>
banisterfiend, Afal: he calls the method afterwards, so he indeed wants respond_to?, not method_defined?
darkskiez joined #ruby
kawa_xxx joined #ruby
lorandi joined #ruby
kawa_xxx joined #ruby
Indian joined #ruby
fermo joined #ruby
banisterfiend joined #ruby
jsaak joined #ruby
Ilithya joined #ruby
a_a_g joined #ruby
IrishGringo joined #ruby
<shevy>
apeiros_! You are back!
<shevy>
apeiros_ I have a question... I think in one of your projects, you use class Foo; class Bar ... is there a reason why it was not module Foo; class Bar ?
as3llus joined #ruby
<apeiros_>
shevy: in that case it'd always be because there's a Foo.new somewhere in the code ;-)
<shevy>
hmmm I see!
<shevy>
that's interesting. basically, if I understand you correctly... class Foo; class Bar gives you more options than module Foo; class Bar ?
dnjaramba joined #ruby
Manhose joined #ruby
tomzx joined #ruby
p0y joined #ruby
bwlang joined #ruby
ph^ joined #ruby
king313 joined #ruby
king313 joined #ruby
replore joined #ruby
jbpros joined #ruby
<apeiros_>
shevy: sorry for slow replies (I'm at work)
<apeiros_>
shevy: no, not more options. it's different.
<apeiros_>
if I want to be able to create instances of Foo, it must be a class.
<apeiros_>
if I want to be able to mix Foo into other things, it must be a module.
<apeiros_>
if none of the two is required and all I want is a namespace, I usually use a module rather than a class.
trivol joined #ruby
<shevy>
hmm ok
Cervajz joined #ruby
dyer joined #ruby
BiHi joined #ruby
randym joined #ruby
[1]Kichael joined #ruby
esparkma_ joined #ruby
dnjaramba joined #ruby
milkshak1s joined #ruby
esparkman joined #ruby
helllen joined #ruby
<helllen>
someone know a good gem to add audit data mapper models?
Helius joined #ruby
Maya-PSK joined #ruby
zanaga joined #ruby
Codif joined #ruby
helllen_ joined #ruby
shevy joined #ruby
Helius joined #ruby
<Johannes`>
hi, why is $0 argv[0], $1 empty and ARGV[0] argv[1]? :S
<Johannes`>
how did this happen?
rickmasta joined #ruby
ohookins joined #ruby
p0y joined #ruby
<ohookins>
i seem to be getting two completely different file sorting orders from FileList on different machines with the same version of ruby and same locales
<ohookins>
i assume FileList internally uses a hash or something unordered, but is the hashing deterministic?
kalusn joined #ruby
cdepue joined #ruby
<apeiros_>
Johannes`: $1-$9 has nothing to do with ARGV
kalusn joined #ruby
<apeiros_>
$1-$9 are for regexen
<apeiros_>
$0 is for program name (aka argv[0] in C)
bastiman_ joined #ruby
<Johannes`>
that's, well, awkward
<Johannes`>
thanks though
<apeiros_>
only if you expected it differently
<Johannes`>
$0 is argv[0], $1 is for regex, ARGV[0] isn't argv[0] but argv[1]
<apeiros_>
ah, well, yes, the naming of $0 is bad, agreed
<apeiros_>
you can use $PROGRAM_NAME instead ;-)
jensn joined #ruby
zanaga joined #ruby
jtrudeau joined #ruby
helllen_ joined #ruby
jfredett joined #ruby
petschbot_ joined #ruby
g0bl1n joined #ruby
helllen_ joined #ruby
emocakes joined #ruby
king313 joined #ruby
king313 joined #ruby
petschbot joined #ruby
beakerman joined #ruby
p0y_ joined #ruby
iocor joined #ruby
helllen_ joined #ruby
jensn joined #ruby
vmil86 joined #ruby
Codif joined #ruby
wyhaines joined #ruby
king313 joined #ruby
king313 joined #ruby
Jackneill joined #ruby
macabre joined #ruby
king313 joined #ruby
jensn joined #ruby
king313 joined #ruby
crankycoder joined #ruby
tommyvyo_ joined #ruby
jrist joined #ruby
Cervajz joined #ruby
heftig joined #ruby
yfeldblum joined #ruby
smgt joined #ruby
rebagliatte joined #ruby
dcarper joined #ruby
omry joined #ruby
havenn joined #ruby
dyer joined #ruby
devdazed joined #ruby
dv310p3r joined #ruby
omry joined #ruby
adamjleonard joined #ruby
petschbot joined #ruby
omry joined #ruby
luoluoluo joined #ruby
omry joined #ruby
adamjleonard-wor joined #ruby
drPoggs joined #ruby
dfamorato joined #ruby
S1kx joined #ruby
S1kx joined #ruby
pHcF joined #ruby
g0bl1n joined #ruby
g0bl1n joined #ruby
helllen_ joined #ruby
cdepue joined #ruby
ph^ joined #ruby
nerded joined #ruby
jwill joined #ruby
bier joined #ruby
bier|tp joined #ruby
robyurkowski joined #ruby
sdavis joined #ruby
sdavis left #ruby
enikar joined #ruby
<ohookins>
can anybody tell me why FileList is returning the entries in different orders here? http://pastie.org/2898075
Ch4rAzZz joined #ruby
phantasm66 joined #ruby
amacgregor joined #ruby
jensn joined #ruby
Telling joined #ruby
theRoUS joined #ruby
theRoUS joined #ruby
theRoUS joined #ruby
theRoUS joined #ruby
bwlang joined #ruby
iocor joined #ruby
axl_ joined #ruby
mjmac joined #ruby
nyuszika7h joined #ruby
mjmac left #ruby
Draco_ joined #ruby
Targen joined #ruby
emocakes joined #ruby
axl_ left #ruby
axl_ joined #ruby
ultraviolet joined #ruby
<ultraviolet>
I'm struggling with 'cgi', when using 'net/ldap', I find it hard to display the data it returns, which is basically concerning nested arrays.
<furrykef>
Why does "foo|".split("|") return ["foo"], but "|foo".split("|") returns ["", "foo"]?
iamjarvo joined #ruby
<apeiros_>
furrykef: because String#split has weird special casing
<furrykef>
Is there an easy way to make the former return ["foo", "|"]?
<furrykef>
Err
<furrykef>
["foo", ""]
<furrykef>
I'm trying to make a simple parser with strings like {foo|bar|baz}, and I'd like {foo|} to mean "foo or nothing", since that's the most natural way for me to write it.
tehdekan joined #ruby
<xec>
dirty way? add a space :D
<furrykef>
Yeah, I thought of that. I don't like it, though.
virunga joined #ruby
<furrykef>
I guess I can just manually check if it ends with a '|' and then add the ""
BiHi joined #ruby
Rango joined #ruby
rippa joined #ruby
<virunga>
Hi, what does Mechanize::Page::Image mean? I know :: is used to get the value of constants that belong to modules.
TheNumb joined #ruby
<rippa>
it's Image constant of Page of Mechanize
steph021 joined #ruby
steph021 joined #ruby
<virunga>
rippa, no, both Page and Image are Class... like Mechanize
<rippa>
you can reference class constant like that too
<lord1234>
why might a ruby program call for Win32API on a linux system? I searched the code and there is no reference to Win32API anywhere in the code.
ckrailo joined #ruby
<virunga>
rippa, but Mechanize and Page shouldn't be modules?
AllStruck joined #ruby
monkey13 joined #ruby
fatguylaughing joined #ruby
<rippa>
I don't know what they should be
smgt joined #ruby
<virunga>
rippa, what does :: do and with what it can be used? Thank you :)
milkpost joined #ruby
<lord1234>
however my program won't run in Linux for some reason.
bwlang joined #ruby
<furrykef>
Oh, here we go. Apparently what I want is "foo|".split("|", -1)
<rippa>
virunga: it's basically the same as .
<rippa>
"asd"::length
<rippa>
it's just convention that :: is used for constant lookup
sonkei joined #ruby
<virunga>
rippa, ok, i understood. Thank you.
ckrailo joined #ruby
travisjeffery joined #ruby
enroxorz joined #ruby
enroxorz joined #ruby
bwwrd joined #ruby
<bwwrd>
I'm a little stuck, I want to insert a newline character after every N words in a string. I don't see a way to do this with a regex alone and figure I need a block. Any ideas?
nerded joined #ruby
apucacao joined #ruby
<emocakes>
replace bwwrd
<emocakes>
[a-zA-Z-0-9]N
<furrykef>
I don't think the hyphen between Z and 0 belongs
luxurymode joined #ruby
<bwwrd>
replace is a method, or you're saying I need to be replaced?!
<emocakes>
I dunno, I'm just here for help to get my windows pc booting
<emocakes>
it's stuck on the blue screen
<furrykef>
My instinct would have been to split the string and iterate over the result, but I'm very new to Ruby, so I'm reluctant to give advice like that.
<bwwrd>
furrykef that's what i was thinking also
<furrykef>
(Most of the 'Ruby' I know is actually from Python, much the same as most of the Italian I know is from Spanish and Latin! ;))
<bwwrd>
was kind of assuming there might be an easier way
<emocakes>
latin is a language?
<furrykef>
Er, what else would it be?
dotnull joined #ruby
<emocakes>
nvm
p0y joined #ruby
<lord1234>
emocakes: its a dead language, but a language nonetheless
Dangr_ joined #ruby
<emocakes>
i love the guys here, you are all so intelligent
<furrykef>
Oh, I can be quite unintelligent.
philcrissman joined #ruby
DeeTah joined #ruby
<bwwrd>
i think i have it ..
<bwwrd>
"the string in question".scan(/(\w+\s+\w+\s+)/).join("\n")
<bwwrd>
would quickly become inefficient if it was more than a couple of words though!
<rippa>
parentheses are redundant
paraglade joined #ruby
alex__c2022 joined #ruby
<furrykef>
That leaves spaces before the newlines
centipedefarmer joined #ruby
<bwwrd>
rippa you're right
p0y joined #ruby
h4mz1d joined #ruby
cpruitt joined #ruby
<rippa>
bwwrd: gsub(/(\w+\s+\w+)\s*/, "\\1\n")
<bwwrd>
YEASSHH!
<bwwrd>
:)
<ohookins>
bwwrd: "some string".split(' ').map { |p| i += 1; i == 8 ? p + "\n" : p + ' ' }
<ohookins>
how about that for ugly
<bwwrd>
:)
<ohookins>
replace 8 with a variable holding your number of words
paraglade left #ruby
<bwwrd>
thanks
<ohookins>
oh, i forgot to reset i to 0
<bwwrd>
really feeling the need to practise my regex now
p0y joined #ruby
<ohookins>
"some string".split(' ').map { |p| i += 1; (i % 8 == 0) ? p + "\n" : p + ' ' }
<ohookins>
meh
paraglade joined #ruby
tobym joined #ruby
dburton joined #ruby
pootpoot joined #ruby
dot_null joined #ruby
pen joined #ruby
<bwwrd>
ohnookins thanks, that was what I was originally trying to do, think i prefer the regex though
maggie_n joined #ruby
<ohookins>
well, you can play around with it at least and get used to blocks
Pip joined #ruby
travisjeffery joined #ruby
<bwwrd>
ohnookins i will, thanks
ph^ joined #ruby
ohookins left #ruby
travisjeffery joined #ruby
akem joined #ruby
akem joined #ruby
pen_isident joined #ruby
flip_digits joined #ruby
baroquebobcat joined #ruby
moomerman joined #ruby
program1 joined #ruby
naftilos76 joined #ruby
rsampaio joined #ruby
emocakes joined #ruby
ph^ joined #ruby
Morkel joined #ruby
_debo joined #ruby
roaminghorse joined #ruby
artOfWar joined #ruby
<lord1234>
any idea why "if var == 'testing'" would not work given that var is equal to 'testing'?
<moomerman>
lord1234: do you have a full example?
LiquidInsect joined #ruby
nerded_ joined #ruby
Guedes joined #ruby
Guedes joined #ruby
_class_ joined #ruby
lkba joined #ruby
burgestrand1 joined #ruby
travisjeffery joined #ruby
<lord1234>
moomerman: thats literally it seriously
<lord1234>
it never enters the if statement
<lord1234>
i can give you more, but I doubt it will help...
<moomerman>
are you sure var is a string? ie. what do you get if you puts var.class.name before the if statement?
<lord1234>
its definitelya string
<lord1234>
cuz i watch it in Netbeans variable watcher
<ycy>
I have two files, foxtrot.rb and foobar.rb ( http://pastebin.com/x6Te4M4v ) - however when I try to launch 'ruby foxtrot.rb' it says: <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- foobar (LoadError). Where am I wrong?
senj joined #ruby
<Mon_Ouie>
I don't love this kind of monkey patching
danielpunt joined #ruby
<Mon_Ouie>
last condition could just be "else", btw
bbttxu joined #ruby
bbttxu joined #ruby
bafilius joined #ruby
LittleBill902 joined #ruby
d3vic3 joined #ruby
adamkittelson joined #ruby
thone_ joined #ruby
Guedes joined #ruby
Guedes joined #ruby
Helius joined #ruby
craigglennie joined #ruby
kf8a joined #ruby
mocker joined #ruby
robyurkowski joined #ruby
s0ber joined #ruby
cpruitt joined #ruby
yekta joined #ruby
rickmasta joined #ruby
gearaholic joined #ruby
travisjeffery joined #ruby
dyer joined #ruby
Axsuul joined #ruby
Koolvin joined #ruby
<Koolvin>
Hey, I am having trouble installing rmagick
<epochwolf|vps>
congrats
travisjeffery joined #ruby
<epochwolf|vps>
I'm having trouble understanding your problem.
<Koolvin>
I need to install rmagick, it's saying failed to build gem native extension
Jake232 joined #ruby
<Koolvin>
Same with rdiscount
rb2k joined #ruby
<Koolvin>
Says /usr/bin/ruby1.8 extconf.rb extconf.rb:1:in require: no such file to load -- mkmf
<epochwolf|vps>
Koolvin: which osx and ruby version?
<shevy>
Koolvin no idea what .source_index does, sorry
<shevy>
yeah nanotubes is getting old
<shevy>
I remember it from around 2000!
<burgestrand>
Koolvin: ask in #ruby-lang those guys tend to know these things
<shevy>
though recently they managed to create the blackest surface
<shevy>
as in one that returns only 0.00001something% light
jay_zawrotny joined #ruby
zodiak joined #ruby
danielpunt joined #ruby
statarb3 joined #ruby
statarb3 joined #ruby
artOfWa__ joined #ruby
paraglade joined #ruby
apeiros_ joined #ruby
Seisatsu joined #ruby
manizzle_ joined #ruby
jonathanrwallace joined #ruby
p1d joined #ruby
flip_digits joined #ruby
mengu joined #ruby
btanaka joined #ruby
enroxorz2 joined #ruby
kassien joined #ruby
notjohn joined #ruby
artOfWar joined #ruby
sdwrage joined #ruby
<jwang>
are roles popular in ruby? vs. inheritance
yaasii joined #ruby
<apeiros_>
if you consider mixing a module as roles, then yes
thecreators joined #ruby
banisterfiend joined #ruby
releod joined #ruby
Citizens joined #ruby
mdunn joined #ruby
mdunn joined #ruby
caveat- joined #ruby
travisjeffery joined #ruby
Skaag joined #ruby
kawa_xxx joined #ruby
<jwang>
apeiros_: cool, thanks
Maya-PSK joined #ruby
jtdowney joined #ruby
jbpros joined #ruby
qizwiz joined #ruby
phantasm66 joined #ruby
mxweas_ joined #ruby
notjohn joined #ruby
Synthead joined #ruby
<qizwiz>
anyone use emacs? what's the preferred method for reading rdoc in emacs now?
<qizwiz>
less specifically, how can I go and add the rdocs for the gems I have which don't have them?
<shevy>
how much perfection should be attained for a project
<shevy>
100% seems to take too much time
subr00t joined #ruby
<subr00t>
do "||=" mean different?
<deryl>
hrmm shouldn't defining a method the same name as a parent class's method override? In Animal.color I have: "The color is #{@color}" then I have a class Cow that inherits from Animal. In Cow I have a method named color that says: "The cow's color is #{@color}." but if I run the app, I get the parent's output not the Cow version.
<deryl>
if its nil then set it to 'value' otherwise use the var's value
<deryl>
var = "hi" ; var ||= "bye" should return hi. but if var was not defined, then var should now equal "bye"
Synthead joined #ruby
<subr00t>
thx deryl :) it seems clear
<deryl>
welcome
notjohn_ joined #ruby
apucacao_ joined #ruby
ephemerian joined #ruby
dzhulk joined #ruby
kenichi joined #ruby
libertyprime joined #ruby
|^j0ng^Il joined #ruby
<shevy>
deryyyyyyyyyl!
<deryl>
?
<shevy>
just bored :)
<deryl>
hehe
<deryl>
i'm trying to get myself in the mood to finish this training set. think i'll eat first and then take the laptop to the bedroom.
<deryl>
sometimes a change of location (away from the desk) is enough to change the mental mindframe.
<ceej>
hey, how would I do date('Y-m-d\TH:i:s.z\Z') in ruby? Time?
Draco_ joined #ruby
kf8a joined #ruby
pHcF joined #ruby
demet8 joined #ruby
jensn joined #ruby
DeeTah joined #ruby
<austinbv>
Time.now
<austinbv>
Err ceej Time#strftime
_class_ joined #ruby
<austinbv>
or that may even be the proper format
monkey13 joined #ruby
amacgregor_ joined #ruby
zobbo|em` joined #ruby
yekta joined #ruby
RomD joined #ruby
amacgregor__ joined #ruby
crodas joined #ruby
mensch joined #ruby
Azure|netbook joined #ruby
Azure joined #ruby
dfamorato joined #ruby
matled joined #ruby
crankycoder joined #ruby
Lann joined #ruby
<Lann>
I am having a problem with ruby's base64 decoding of double byte characters. Is there something special i need to do to base64 decode double byte chars?
nerded joined #ruby
robyurkowski joined #ruby
zodiak joined #ruby
<shadoi>
Lann: you're using 1.9.2+? And you're forcing UTF-8?
<Lann>
shadoi: how do i force utf-8? i may not be, yest 1.9.2