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?
nari_ joined #ruby
Cervajz joined #ruby
randym_ joined #ruby
p0y joined #ruby
banisterfiend joined #ruby
dbgster joined #ruby
Emmanuel_Chanel joined #ruby
roaminghorse joined #ruby
sdwrage joined #ruby
mikeycgto_ joined #ruby
manizzle joined #ruby
emocakes joined #ruby
rsampaio joined #ruby
havenn joined #ruby
philcrissman joined #ruby
dissolve joined #ruby
otakutomo joined #ruby
Adept` joined #ruby
johnjacobson joined #ruby
tomzx joined #ruby
norex joined #ruby
fujimura joined #ruby
fujimura left #ruby
pspeter3 joined #ruby
steakknife joined #ruby
savage- joined #ruby
thecreators joined #ruby
sdavis joined #ruby
<bjorkintosh> what's a good ruby source to read?
emocakes joined #ruby
Emmanuel_Chanel joined #ruby
mdel joined #ruby
oponder joined #ruby
<shevy> bjorkintosh https://github.com/pry/pry
<bjorkintosh> is it written in ruby?
<shevy> yeah
<shevy> go through the lib/ subdir
<ryanf> haha
<banisterfiend> bjorkintosh: i probalby wouldnt recommend pry for a beginner actually
p0y joined #ruby
<bjorkintosh> banisterfiend, i don't see a recommendation.
<banisterfiend> bjorkintosh: ok
<shevy> well if you want simpler projects ... like something like ... slurp
thecreators_ joined #ruby
<shevy> oh wait
rickmasta joined #ruby
<shevy> what was its name again :/
<shevy> oh yes
<shevy> slop, not slurp
<shevy> but now you see how I remember things ...
<bjorkintosh> which one's slop?
<shevy> single .rb file really
<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?
<bjorkintosh> where should i start reading?
<banisterfiend> bjorkintosh: reading what? pry's code? probably pry_class.rb
tayy joined #ruby
<bjorkintosh> okay.
<banisterfiend> bjorkintosh: and then pry_instance.rb
<banisterfiend> pry_instance is the engine room i guess
<bjorkintosh> which came first?
<banisterfiend> they used to be in a single file
<banisterfiend> so they were written the same time
Natch| joined #ruby
fayimora joined #ruby
ghanima joined #ruby
sdwrage joined #ruby
<shevy> hehe cool
<shevy> we go back in pry history
<shevy> what music were you listening when you write ruby code banisterfiend
<shevy> (wrote *that* ruby code)
<drizz> basshunter and cascada
_numbers joined #ruby
_numbers left #ruby
Emmanuel_Chanel joined #ruby
rsampaio joined #ruby
hasrb joined #ruby
advorak joined #ruby
rvmeier joined #ruby
CannedCorn joined #ruby
RyanV joined #ruby
satyavvd joined #ruby
sdwrage joined #ruby
Backsorry joined #ruby
h4mz1d joined #ruby
dchelimsky joined #ruby
Cervajz joined #ruby
dabaR joined #ruby
<dabaR> If my git repo that I am deploying uses a submodule, how should I tell capistrano to also check out the submodule code?
philcrissman joined #ruby
<dabaR> It appears this is a reasonable way to do it: https://gist.github.com/154482 , then hook up git:submodule:pull to after deploy:update_code
hasrb joined #ruby
x0F_ joined #ruby
dhodgkin joined #ruby
pen joined #ruby
IrishGringo joined #ruby
KL7 joined #ruby
Emmanuel_Chanel joined #ruby
iamjarvo joined #ruby
redgetan joined #ruby
n8ji joined #ruby
rsampaio joined #ruby
Draco_ joined #ruby
kawa_xxx joined #ruby
LittleBill902 joined #ruby
moondiamond joined #ruby
badabim joined #ruby
mxweas_ joined #ruby
GreaseMonkey joined #ruby
LittleBill902 joined #ruby
Cervajz joined #ruby
brownies joined #ruby
<brownies> does have anyone have a link to a nice intro guide about ajax and rails?
Cervajz_ joined #ruby
kawa_xxx_ joined #ruby
dagnachewa joined #ruby
redgetan left #ruby
mikeycgto_ joined #ruby
baroquebobcat joined #ruby
p0y joined #ruby
rsampaio joined #ruby
<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.
<ultraviolet> http://paste.pocoo.org/show/510940/ <-- Could someone tell me why I cannot access 'entry.model[0]', for instance?
travisjeffery joined #ruby
<ultraviolet> If I try it bombs out.
kawa_xxx joined #ruby
furrykef joined #ruby
albemuth joined #ruby
<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
gearaholic joined #ruby
dabaR joined #ruby
yekta joined #ruby
Hoornet joined #ruby
Draco_ joined #ruby
<virunga> help
<rippa> so what
lord1234 joined #ruby
<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?!
crodas joined #ruby
<emocakes> sorry furrykef, syntax error
<bwwrd> ok
<emocakes> replace is a method ;)
<bwwrd> :)
<emocakes> or i'm sure you can do an easier route
<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
<lord1234> and it definitely is of type string
<lord1234> if thats of any use
artOfWar joined #ruby
<lord1234> i can give more if you think it serves a purpose
<moomerman> just put in before the if statement: puts sWebDriver.inspect; puts sWebDriver.class.name
<moomerman> and see what you get out
s1n4 joined #ruby
program1 joined #ruby
btanaka joined #ruby
s1n4 left #ruby
vic joined #ruby
mikepack joined #ruby
Draco_ joined #ruby
nerded joined #ruby
lampe2 joined #ruby
<lampe2> hey i wanne get the last index of an array but in the array are some strings more then once init A['a','b','a'] can some one help ?
<burgestrand1> lampe2: last index of an array?
<burgestrand> Last item?
<lampe2> burgestrand, not the item the index number in my case 3
<burgestrand> lampe2: oh, you mean you want the *last* index of an item in the array?
<rippa> array.size
nerded_ joined #ruby
<LiquidInsect> you just want the array's length right?
<rippa> -1
<LiquidInsect> what rippa said
moomerman left #ruby
<lampe2> ahhh size... sry i tryed length ;) thx
v0n joined #ruby
robyurkowski joined #ruby
<burgestrand> … length works too
<burgestrand> [1, 2, 3].length # => 3
iocor joined #ruby
silent_dream joined #ruby
benj_ joined #ruby
mickn joined #ruby
lorandi joined #ruby
stephenjudkins joined #ruby
Skaag joined #ruby
dnyy joined #ruby
ontehfritz joined #ruby
ChampS_ joined #ruby
ultraviolet joined #ruby
Skaag_ joined #ruby
lobo_d_b joined #ruby
lobo_d_b joined #ruby
cbuxton joined #ruby
zmisc joined #ruby
<silent_dream> whats the best way to decode a substitution cipher in Ruby?
Evixion joined #ruby
jrun joined #ruby
MasterIdler_ joined #ruby
jrun joined #ruby
cdepue joined #ruby
program1 joined #ruby
eignerchris joined #ruby
akem joined #ruby
n8ji joined #ruby
Memitim joined #ruby
travisjeffery joined #ruby
drigo joined #ruby
Araxia_ joined #ruby
shikamaru joined #ruby
Memitim left #ruby
kaneda joined #ruby
maletor joined #ruby
king313 joined #ruby
king313 joined #ruby
TheNumb joined #ruby
kartouch joined #ruby
steph021 joined #ruby
steph021 joined #ruby
<lord1234> w
teubanks joined #ruby
robyurkowski joined #ruby
rob125 joined #ruby
Bonkers joined #ruby
<furrykef> w? What's so funny?
travisjeffery joined #ruby
petschbot joined #ruby
p0y joined #ruby
a_a_g joined #ruby
tjj joined #ruby
dfamorato_ joined #ruby
hasrb joined #ruby
travisjeffery joined #ruby
enikar joined #ruby
SegFaultAX|work joined #ruby
stkowski joined #ruby
sepp2k joined #ruby
macmartine joined #ruby
wyhaines joined #ruby
stephenjudkins joined #ruby
teubanks joined #ruby
emocakes joined #ruby
v0n joined #ruby
tayy joined #ruby
kenichi joined #ruby
h4mz1d joined #ruby
rebagliatte joined #ruby
iamjarvo joined #ruby
rushed left #ruby
airhorns joined #ruby
robyurkowski joined #ruby
Draco_ joined #ruby
apok joined #ruby
quest88 joined #ruby
ablemike joined #ruby
adamkittelson joined #ruby
ghanima joined #ruby
whitewhine joined #ruby
jrbing joined #ruby
eywu joined #ruby
Indian joined #ruby
kaneda joined #ruby
hasrb joined #ruby
Russell^^ joined #ruby
Stuffness joined #ruby
josh_ joined #ruby
drigo2 joined #ruby
<Stuffness> Hi, is there any shorter way of saying if asdf == "a" || asdf == "b" || asdf == "c"
<Stuffness> one thing I'm thinking is if asdf is in ["a","b","c"]
<Mon_Ouie> You can use Array#include?
ablemike left #ruby
tvo joined #ruby
tvo joined #ruby
<Stuffness> Thanks
nerded joined #ruby
ank joined #ruby
beckybunny joined #ruby
EddieBluh joined #ruby
bafilius joined #ruby
enikar joined #ruby
Targen joined #ruby
Morkel joined #ruby
kf8a joined #ruby
<no-name-> does ruby have an equivalent to range() in python?
<yxhuvud> like 1..2 ?
redgetan joined #ruby
<no-name-> ahh, that works
failshell joined #ruby
<failshell> hello. what would be the best way to extract the id from a server name like webserver01.example.com? im looking for the 2 numbers.
<no-name-> how do you do steps with that?
<no-name-> I tried 1..10..2 but it was a no go
beckybunny joined #ruby
lord1234 left #ruby
voodoofish430 joined #ruby
<furrykef> no-name- -- you should be able to iterate over ranges like this: (0..10).step(2) do |x| ... end
n8ji_ joined #ruby
kenichi_ joined #ruby
petschbot joined #ruby
paraglade joined #ruby
<no-name-> furrykef: thank
<no-name-> s
syamajala joined #ruby
<furrykef> Or actually I guess that should have been 0..9 or 1..10, but you get the idea :3
pantsman joined #ruby
pantsman joined #ruby
<Stuffness> in the net http library, what is the difference between request_head and head methods?
yekta joined #ruby
<Stuffness> the docs don't explain it well enough for me to understand
<Stuffness> request_head is also aliased as head2
thecreators joined #ruby
fortysixandtwo joined #ruby
ChampS_ joined #ruby
rb2k joined #ruby
hooper joined #ruby
j3r0m3 joined #ruby
iocor joined #ruby
stephans joined #ruby
<furrykef> I get an msvcrt-ruby18.dll error after installing wxruby on 1.9.3
a_a_g joined #ruby
<furrykef> oh, I have to install wxruby-ruby19 instead
<Jarred> Is there a method in Ruby's standard library that converts numerical integers into their word-form, like 1 == "one"
Johannes` left #ruby
julian-delphiki joined #ruby
<furrykef> Seems unlikely to me that such a language-specific feature would be in the standard library.
dotnull joined #ruby
<furrykef> After all, 1 == "uno" in Spanish
<furrykef> (and becomes "un" or "una" a lot of the time!)
travisjeffery joined #ruby
pantsman- joined #ruby
enroxorz joined #ruby
enroxorz joined #ruby
theoros joined #ruby
<Jarred> Yeah, I found a gem that does it --> http://deveiate.org/projects/Linguistics/wiki/English
nerded_ joined #ruby
workmad3 joined #ruby
densebits joined #ruby
hooper joined #ruby
ph^ joined #ruby
daniel_hinojosa joined #ruby
luckyruby joined #ruby
nanoyak joined #ruby
jbw joined #ruby
<no-name-> Jarred: that's cool, man
a_a_g joined #ruby
iori joined #ruby
emptyflask joined #ruby
Jake232 joined #ruby
shadoi joined #ruby
mercenarul joined #ruby
amacgregor_ joined #ruby
austinbv joined #ruby
<austinbv> is there a method for int in ruby that turns an int into a place like 1 => 1st 2 => 2nd... etc
adeponte joined #ruby
Adman65 joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
Revernd joined #ruby
nerded joined #ruby
ph^ joined #ruby
LittleBill902 joined #ruby
zmanfx joined #ruby
Pip_ joined #ruby
<austinbv> :( it's quiet
cjs226 joined #ruby
Draco_ joined #ruby
libertyprime joined #ruby
julian-delphiki joined #ruby
josephwilk joined #ruby
mocker joined #ruby
macmartine joined #ruby
adamkittelson joined #ruby
king313 joined #ruby
king313 joined #ruby
P4P4jUL137 joined #ruby
adurity joined #ruby
a_a_g joined #ruby
a_a_g1 joined #ruby
a_a_g1 left #ruby
program1 joined #ruby
Nanuq joined #ruby
<shevy> austinbv there is not but you could write a module that does that
kirun joined #ruby
<austinbv> yeah it was easy
<shevy> :)
<austinbv> I just hate doing it when it already exists
LittleBill902 joined #ruby
<Mon_Ouie> I would most likely put something like that in its own method
<Mon_Ouie> like def ordinal(n)
<austinbv> I am
trivol joined #ruby
Maya-PSK joined #ruby
Monit0r joined #ruby
Jake232 joined #ruby
manizzle joined #ruby
Draco_ joined #ruby
|PiP| joined #ruby
<|PiP|> anyone here well versed in using the gdata gem?
badabim joined #ruby
workmad3 joined #ruby
<austinbv> can you have or operators in case statements
<austinbv> ah its a .
<austinbv> ,
fourQ joined #ruby
<austinbv> i love ruby https://gist.github.com/1383724
fourQ left #ruby
ycy joined #ruby
<ycy> hi there
headius joined #ruby
drigo joined #ruby
<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?
<epochwolf|vps> os*
<Koolvin> Ubuntu and ruby 1.8.11 I believe
<Koolvin> Yes. 1.8.11
cyri_ joined #ruby
<Koolvin> Ubuntu 10.04
<Koolvin> Wait not 1.8.11
Azure joined #ruby
<Koolvin> 1.8.7
<Koolvin> 1.8.11 is rubygems
silent_dream left #ruby
<epochwolf|vps> Koolvin: rubygems needs the source files for imagemagick to compile against.
<epochwolf|vps> that link should tell you want to install
<jwang> what's the general preference for including 'self.' in method definitions and method calls within your methods of the same class?
<epochwolf|vps> jwang: def self.method means it's a class method instead of an instance method.
<epochwolf|vps> inside a method using self.method to call stuff is needed if you created a local variable of the same name.
kassien joined #ruby
<jwang> epochwolf: cool, thanks
youdonotexist joined #ruby
kassien joined #ruby
LittleBill902 joined #ruby
LittleBill902 joined #ruby
daniel_hinojosa1 joined #ruby
<Koolvin> How do I remove ruygems once it's installed
apok joined #ruby
<Koolvin> Here's my issue now, it's asking for ruby1.8 which doesn't exists
<Koolvin> On ubuntu how do I change that to just ruby
<Koolvin> Bash: /usr/bin/gem: /usr/bin/ruby1.8: bad interpreter: No such file or directory
<shevy> debian loves to use funny symlinks to ruby
rob125 joined #ruby
<shevy> Koolvin, you should be able to add a symlink from ruby to ruby1.8
<shevy> or, you tell them how crazy it is to try "versioned binaries"
<Koolvin> Shevy, how do I find where the actual ruby is?
<shevy> ln - s /usr/bin/ruby /usr/bin/ruby1.8
<shevy> try locate ruby
<shevy> but if debian is consistent, it will be under /usr/bin
<workmad3> Koolvin: which ruby
<shevy> sometimes they symlink into /etc/alternatives/ruby
paraglade left #ruby
<workmad3> Koolvin: which will tell you the ruby bin that will be used if you just type 'ruby' on the command line
<Koolvin> Root@ubuntu:/tmp/rubygems-1.8.11# locate ruby
<Koolvin> :/etc/apparmor.d/abstractions/ruby
<Koolvin> Is that it?
<workmad3> Koolvin: locate will tell you every file and path with 'ruby' in it on your system
<workmad3> not necessarily the binary...
<Koolvin> The only other is this: /usr/share/nano/ruby.nanorc
ycy left #ruby
program1 joined #ruby
tshauck joined #ruby
burgestrand joined #ruby
<shevy> only two?
travisjeffery joined #ruby
<shevy> Koolvin is there no /usr/bin/ruby file?
<Koolvin> Nope
<shevy> very odd
<Koolvin> However, ruby commands work
program1 joined #ruby
<shevy> you can also try "strace ruby". and did you try "which ruby" yet?
<program1> <?xml version="1.0" encoding="UTF-8"?>
<program1> <kml xmlns="http://www.google.com/earth/kml/2">
<program1> <Document>
<program1> <name>Arkansas mines</name>
<program1> <Style id="adit_abandoned">
havenn joined #ruby
mocker joined #ruby
<shevy> but I tell you what Koolvin, your system is in violation of the FHS
<Koolvin> Its in /usr/local/bin/ruby
program1 joined #ruby
<shevy> did you install that on your own?
<Koolvin> Installed from a deb
<Koolvin> .deb
<shevy> the default prefix to install and compile something from source is into /usr/local
<Koolvin> Dpkg
<shevy> odd
<Koolvin> Alright
<Koolvin> Symlink in place
<program1> how do I fix it
<Koolvin> Ty shevy
Axsuul joined #ruby
yekta joined #ruby
<shevy> program1 I would suggest by refusing to use XML ;)
<burgestrand> Ah, so this is where he comes from
<program1> it says parse error at 3308 unmatched tag
<program1> Why does it have a mismatched tag
<program1> ,
<burgestrand> Sounds like badly formatted XML to me
apow joined #ruby
quest88_ joined #ruby
g0bl1n joined #ruby
<shevy> good old XML
<shevy> driving people crazy since .. 19xx something
apow joined #ruby
jankly left #ruby
<UdontKnow> shevy: yeah, all those old scrolls with missing encoding/i18n tags
zobbo|emacs joined #ruby
Manhose joined #ruby
lobo_d_b joined #ruby
apow joined #ruby
My_Hearing joined #ruby
james_cotterill joined #ruby
cooper joined #ruby
petschbot joined #ruby
pantsman joined #ruby
pantsman joined #ruby
workmad3 joined #ruby
_class_0 joined #ruby
Pip joined #ruby
yekta joined #ruby
yekta_ joined #ruby
moshee joined #ruby
moshee joined #ruby
minijupe joined #ruby
<Koolvin> How can I downgrade rubygems?
<LiquidInsect> Koolvin: are you using rvm?
<Koolvin> I have a program that's calling Gem.source_index
<Koolvin> I'm using ubuntu
<LiquidInsect> that doesn't answer my question
<Koolvin> I have no idea.
yekta joined #ruby
<shevy> Koolvin the rough way would be to remove the current one, and install the new one
<Koolvin> How would I do that?
<LiquidInsect> If you are using rvm, 'rvm rubygems <version> will do it
Stuffness left #ruby
akem joined #ruby
akem joined #ruby
<shevy> LiquidInsect I think at this point we can assume that he does not use rvm
iocor joined #ruby
omry joined #ruby
<deryl> here's some cool stuff! Advancements for quantum computing. http://www.physorg.com/news/2011-11-simple-unearthing-quantum-state.html
<shevy> Koolvin well depends on what you installed so far I guess... my recommendation would be to kill the gem-directory :P
<Koolvin> I need to use gem.source_index
<burgestrand> Feels like everything today will change technology as we know it
<burgestrand> :(
<yxhuvud> burgestrand: and it is a glorious thing
<burgestrand> FTL particles, graphene, nanomaterials, quantum shiznits
<burgestrand> It’s awesome but getting old! :d
<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.
<|^j0ng^Il> I'm trying to load a KML file at http://pastebin.com/7T1v6jAj and it isn't using the new placemark icon in <style>. it's like <Style id="workings_abandoned"> then <Icon><href>http://www.geology.arkansas.gov/minerals/amc_icons/WORKINGS_INTERMITTENT.png</href></Icon> but it's not working. How do I make it work without using <StyleMap> and two different styles?
moshee joined #ruby
moshee joined #ruby
<burgestrand> Hi again program1
nari_ joined #ruby
randym joined #ruby
pHcF joined #ruby
ilyam joined #ruby
pHcF joined #ruby
cbuxton1 joined #ruby
baniseterfiend` joined #ruby
visof joined #ruby
cjs226 joined #ruby
pootpoot left #ruby
h4mz1d joined #ruby
ceej joined #ruby
<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
philcrissman joined #ruby
bafilius joined #ruby
sbanwart joined #ruby
Y_Ichiro joined #ruby
<burgestrand> Base64.decode64(str).force_encoding('whatever_encoding_the_data_is_in')
<shadoi> ^^
fcoury joined #ruby
<Lann> ah ok thanks
raincole joined #ruby
freshcocoa2 joined #ruby
austinbv joined #ruby
<Lann> burgestrand it seems string.force_encoding is deprecated?
<burgestrand> Lann: not that I’m aware of, which version of ruby are you running?
SolarisBoy joined #ruby
dyer joined #ruby
<Lann> ah, 1.8.7
door1602 joined #ruby
Emmanuel_Chanel joined #ruby
zobbo|em` joined #ruby
<burgestrand> You’ll want to run ruby 1.9.2 and up if you want encoding awareness
RomD joined #ruby
milkshakes joined #ruby
crodas joined #ruby
nerded joined #ruby