hotpancakes has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
Boohbah has joined #ruby-lang
tectonic has joined #ruby-lang
davispuh has quit [Ping timeout: 260 seconds]
klmlfl has quit [Quit: klmlfl]
alexju has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
thomasxie has joined #ruby-lang
j4cknewt has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 260 seconds]
taylorrf has joined #ruby-lang
CaptainJet has quit []
havenwood has quit [Read error: Connection reset by peer]
j4cknewt has quit [Ping timeout: 260 seconds]
taylorrf has quit [Read error: No route to host]
taylorrf has joined #ruby-lang
thomasxie has quit [Quit: Leaving.]
Raynes has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
tris has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
benlovell has joined #ruby-lang
Lewix has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 246 seconds]
j4cknewt has joined #ruby-lang
pr0ton has joined #ruby-lang
MouseTheLuckyDog has joined #ruby-lang
<MouseTheLuckyDog>
Is there a way of listing all the varaibles available in an environment/scope/binding?
RobertBirnie has joined #ruby-lang
<womble>
MouseTheLuckyDog: Local variables, or instance variables?
<MouseTheLuckyDog>
womble: All variables. Essentially I want to print the environment.
<womble>
The environment doesn't equal all variables.
<womble>
It also includes all constants, and methods.
<womble>
And all unary operators, technically.
<MouseTheLuckyDog>
I did say "essentially"
shinnya has quit [Ping timeout: 272 seconds]
<womble>
MouseTheLuckyDog: Please be specific about what you want. I'm not going to play 20 questions to work out what you're *actually* trying to achieve.
arooni-mobile has joined #ruby-lang
duderonomy has joined #ruby-lang
klmlfl has joined #ruby-lang
duderonomy has quit [Ping timeout: 260 seconds]
klmlfl_ has joined #ruby-lang
klmlfl has quit [Quit: klmlfl]
klmlfl_ has quit [Client Quit]
klmlfl has joined #ruby-lang
mistym has joined #ruby-lang
zz_rubydiamond is now known as anildigital
hahuang65 has joined #ruby-lang
kirin` has quit [Ping timeout: 255 seconds]
kirin` has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
yatish27 has joined #ruby-lang
toastynerd has joined #ruby-lang
gix has joined #ruby-lang
havenwood has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
kirin` has joined #ruby-lang
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
klmlfl has left #ruby-lang [#ruby-lang]
klmlfl has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
tkuchiki_ has joined #ruby-lang
charliesome has joined #ruby-lang
pr0ton has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 250 seconds]
toastynerd has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 240 seconds]
ruskie has quit [Quit: ...]
tkuchiki_ has quit [Ping timeout: 250 seconds]
Mon_Ouie has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 255 seconds]
danijoo has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby-lang
danijoo has joined #ruby-lang
ruskie has joined #ruby-lang
spuk has joined #ruby-lang
Miphix has joined #ruby-lang
jko_ has joined #ruby-lang
Miphix has quit [Client Quit]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Miphix has joined #ruby-lang
koderok has joined #ruby-lang
lsegal has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
spastorino has quit [Quit: Connection closed for inactivity]
RobertBirnie has joined #ruby-lang
kgrz has joined #ruby-lang
klmlfl has quit [Ping timeout: 264 seconds]
hotpancakes has quit []
imperator has joined #ruby-lang
<imperator>
hola
<havenwood>
aloha
benlovell has joined #ruby-lang
yatish27 has quit []
toastynerd has joined #ruby-lang
tectonic has quit []
benlovell has quit [Ping timeout: 240 seconds]
arooni-mobile has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
nhjk has joined #ruby-lang
jko_ has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
ta has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
<freedrull>
i don't quite understand why URI.escape doesn't escape square brackets, yet URI.parse tells me they are invalid
anildigital is now known as zz_anildigital
* womble
is pretty sure square brackets in a URL are fine
<freedrull>
that would why URI.escape doesn't escape them
<freedrull>
i think they are reserved and should be escaped?
macsplean1 has quit [Client Quit]
<womble>
freedrull: "If data for a URI component would conflict with a reserved character's purpose as a delimiter, then the conflicting data must be percent-encoded before the URI is formed."
<womble>
Are you using '[' in a context where it would conflict with its purpose as a delimiter?
nhjk has quit [Remote host closed the connection]
arooni-mobile has quit [Remote host closed the connection]
klmlfl_ has joined #ruby-lang
<imperator>
freedrull, got an example where uri.parse fails on square brackets? might be a bug worth reporting
mistym has quit [Remote host closed the connection]
<womble>
Which I reckon is completely full of shit, because ~ is in the same group as [ ], and people put ~ in their URL paths *all* *the* *time*
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
toastynerd has joined #ruby-lang
tkuchiki has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
<womble>
OK, RFC3986 says that a path can contain any unreserved (ALPHA / DIGIT / "-" / "." / "_" / "~"), pct-encoded ("%NN"), sub-delims (lots of punctuation, but notably *not* [ or ]), : or @.
<womble>
So looks like you can't use ?, #, [ or ], but everything else is fair game
RobertBirnie has quit [Ping timeout: 245 seconds]
<womble>
Looks like URI.escape is in the wrong, which I can't say I'm surprised about, since it's wickedly hard to get that sort of thing completely right for the general case.
* womble
feels like putting square brackets in a few filenames, just to catch out people with dodgy escaping functions.
<womble>
Part of the problem is that the rules are different in different parts of the URI, yet there's no way to tell URI.escape which part of the URI the data you're escaping will go
<womble>
Interestingly, uri = URI(""); uri.path = "/[blahblah]blah.html" freaks out, too
djbkd has joined #ruby-lang
<womble>
When it *should*, ideally, just escape it for you and let you get on with your day.
<imperator>
so, wait, his url is invalid anyway according to the rfc?
<womble>
Yes.
<womble>
The square brackets need to be percent-encoded
<imperator>
the square brackets that are illegal anyway?
<freedrull>
URI.escape doesn't escape them though
<freedrull>
should they be escaped or are they just flat out not allowed?
<womble>
freedrull: Because it's either buggy, or it is assuming the wrong part of the URI space
<womble>
freedrull: They should be escaped.
<womble>
You can have *anything* in a URI, if it's escaped.
<imperator>
i suspect others disagree
<womble>
I'm sure they do.
<womble>
However the RFC seems relatively clear on that point -- pct-encoded is % followed by *any* two hex characters
yfeldblu_ has joined #ruby-lang
<womble>
Interestingly, the query portion of the URI *also* can't have unescaped [ and ], and yet URI.parse is quite OK with http://google.com/foo.html?bar[baz]=wombat
<freedrull>
oh so certain parts of the URI allow brackets unescape?
<freedrull>
hmm
<womble>
freedrull: Yes, the authority portion, surrounding IP literals
<freedrull>
interesting
yfeldblum has quit [Ping timeout: 240 seconds]
<womble>
imperator: Looks like your interpretation of the "reserved within the authority component" was correct -- they're reserved, and only available for use in the authority component to surround IP literals.
sharpmachine has quit [Remote host closed the connection]
<womble>
freedrull: Yes, that's how I found the older bug.
toastynerd has joined #ruby-lang
<womble>
It's a poor situation all round -- people have been playing fast-and-loose with URLs for years (decades?), and now the common practices are so deeply ingrained that trying to follow the *actual* *standard* is practically impossible.
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby-lang
<womble>
A strict RFC3986 URI parser/escaper will explode everything; a compromise parser will bite someone in the butt sooner or later.
kyb3r_ has joined #ruby-lang
<freedrull>
true
<freedrull>
ugh well i guess i have to get on with my day at some point
<freedrull>
interesting as this all is
<womble>
I hear ya
mfmfmfmfmfmf has joined #ruby-lang
<womble>
It's bad when reading an RFC about URI syntax is more gripping than writing the test cases I'm supposed to be writing
_ht has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
toastynerd has quit [Remote host closed the connection]
tkuchiki_ has joined #ruby-lang
[spoiler] has joined #ruby-lang
havenwood has quit []
tkuchiki has quit [Ping timeout: 255 seconds]
AKASkip has joined #ruby-lang
anildigital is now known as zz_anildigital
Savtech has joined #ruby-lang
nofxx_ has joined #ruby-lang
imperator has quit [Quit: Valete!]
benlovell has joined #ruby-lang
mfmfmfmfmfmf has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
Lewix has joined #ruby-lang
bsvineeth has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 264 seconds]
bsvineeth has joined #ruby-lang
relix has joined #ruby-lang
solars has joined #ruby-lang
RobertBirnie has joined #ruby-lang
mistym_ has joined #ruby-lang
mistym has quit [Ping timeout: 260 seconds]
diegoviola has quit [Remote host closed the connection]
eeezkil has joined #ruby-lang
alexju has quit [Remote host closed the connection]
bsvineeth has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
mkaesz has joined #ruby-lang
bsvineeth has joined #ruby-lang
Averna has quit [Quit: Leaving.]
futilegames has joined #ruby-lang
kwd has joined #ruby-lang
ta has joined #ruby-lang
ta has quit [Client Quit]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta has joined #ruby-lang
RobertBirnie has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
RobertBirnie has quit [Ping timeout: 260 seconds]
JoshuaPaling has joined #ruby-lang
Sphynx has joined #ruby-lang
ur5us has joined #ruby-lang
benlovell has joined #ruby-lang
goatish_mound has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
<rogaboru>
I don’t know, what’s wrong with my quotes. It’s “ “
<yorickpeterse>
might be your IRC client
<yorickpeterse>
Random guess, what happens if you use JSON.load instead of JSON.parse ?
<yorickpeterse>
shouldn't make a difference but it's a guess
<yorickpeterse>
Also what do you actually mean with the file contains hyphens. Do you mean that `data` contains strings with hyphens in it, that aren't there in the input file?
<rogaboru>
data
<rogaboru>
Yes, data
<rogaboru>
When I use JSON.load, data is parsed
kgrz has joined #ruby-lang
chouhoulis has joined #ruby-lang
<rogaboru>
It’s File.read issue, I checked in irb
<yorickpeterse>
and you are sure the hyphens are not there in the actual file itself?
ItSANgo_ has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
Forgetful_Lion has quit [Remote host closed the connection]
<rogaboru>
Yes
<rogaboru>
Oh
<rogaboru>
Python is reading file with hyphens too
<rogaboru>
WTF
<rogaboru>
And nano
<rogaboru>
Sorry guys
<rogaboru>
Seems like it isn’t ruby issue
<rogaboru>
Thank you for help
<yorickpeterse>
heh
molawson has joined #ruby-lang
<rogaboru>
Maybe it’s Sublime messed all up
thoolihan has quit [Ping timeout: 263 seconds]
Miphix has quit [Quit: Leaving]
symm- has joined #ruby-lang
Siyfion has joined #ruby-lang
rogaboru has quit [Quit: rogaboru]
futilegames has quit [Quit: futilegames]
ItSANgo has joined #ruby-lang
Miphix has joined #ruby-lang
jxie_ has quit [Read error: Connection reset by peer]
MicD_ is now known as MichD
arBmind has quit [Quit: Leaving.]
jxie has joined #ruby-lang
kek has quit [Remote host closed the connection]
Cort3z has quit [Remote host closed the connection]
face has joined #ruby-lang
faces has quit [Ping timeout: 260 seconds]
molawson has quit [Ping timeout: 250 seconds]
rolfb has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
kyb3r_ has quit [Read error: Connection reset by peer]
ruby-lang268 has joined #ruby-lang
king313 has joined #ruby-lang
king313 has joined #ruby-lang
<ruby-lang268>
hi what's the meaning of symbol in the name of a method?
haraoka has quit [Remote host closed the connection]
ruby-lang268 has left #ruby-lang [#ruby-lang]
stamina has joined #ruby-lang
rocky has joined #ruby-lang
tkuchiki has joined #ruby-lang
rocky has quit [Client Quit]
<yorickpeterse>
well that was quick
Sphynx has quit [Remote host closed the connection]
tkuchiki_ has quit [Ping timeout: 246 seconds]
<rolfb>
is there a ... tool for ruby which will analyze the code and let you see all the calls you make which an explicit dependency outside your own code?
tkuchiki has quit [Ping timeout: 240 seconds]
<yorickpeterse>
rolfb: No
<yorickpeterse>
rolfb: https://github.com/yorickpeterse/ruby-lint has basic foundations in place for method call tracking, but it does not yet track the source location (that is, file path, line, etc)
koderok has quit [Quit: koderok]
arBmind has joined #ruby-lang
<rolfb>
yorickpeterse: where's the spec for basic method call tracking?
arBmind has quit [Client Quit]
taylorrf has joined #ruby-lang
chussenot has quit [Quit: chussenot]
migbar has joined #ruby-lang
kek has joined #ruby-lang
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
thoolihan has joined #ruby-lang
stamina has quit [Quit: WeeChat 0.4.3]
koderok has joined #ruby-lang
ddv has quit [Changing host]
ddv has joined #ruby-lang
bsvineeth has joined #ruby-lang
koderok has quit [Client Quit]
benlovell has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Remote host closed the connection]
<canton7>
yell0wgh0st, a class represents a thing, like a Cat or a Car. A Cat has an age and a name. An instance of a Cat is a specific cat. I can have one Cat instance with a name of Bob and an age of 18, and another Cat instance with a name of Joey and an age of 3. They're both Cat instances - that is, instances of the Cat class
AKASkip has quit [Ping timeout: 246 seconds]
<canton7>
you create a new Cat instance - that is, a new Cat with a name an an age - using Cat.new(...)
<yell0wgh0st>
Great I think I got it ;-)
yfeldblum has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
Sphynx has quit [Remote host closed the connection]
earthquake has joined #ruby-lang
<yell0wgh0st>
so in the initializer there should be all of these specific attributes for the instance like age, color, cat’s name etc.
<yell0wgh0st>
right?
yfeldblum has quit [Ping timeout: 272 seconds]
<canton7>
so if you wanted to be able to create cats by writing 'Cat.new("Bob", 22)', then you'd have an initializer with the signature "def initialize(name, age)", and it would set the properties "@name = name" and "@age = age"
jonatha__ has joined #ruby-lang
jonathan_alban has quit [Ping timeout: 250 seconds]
Benstr_ has quit [Quit: Computer has gone to sleep.]
spastorino has joined #ruby-lang
Benstr_ has joined #ruby-lang
<yell0wgh0st>
Thx, really usefull!
Benstr__ has joined #ruby-lang
<canton7>
:)
futilegames has joined #ruby-lang
Benstr_ has quit [Ping timeout: 272 seconds]
ItSANgo has quit [Quit: Leaving...]
joast has joined #ruby-lang
Sphynx has joined #ruby-lang
yalue has joined #ruby-lang
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 245 seconds]
raggedjack has joined #ruby-lang
earthquake has quit [Quit: earthquake]
<darix>
when using optionparser, is there no easy way to get the remaining command line arguments with all the arguments removed that were handled by optionparser already?
<crankharder>
requiring relative paths was removed in 1.9? really?
omosoj has joined #ruby-lang
ohsix has joined #ruby-lang
king313 has joined #ruby-lang
blowmage` has joined #ruby-lang
zz_dlu has joined #ruby-lang
ruskie has joined #ruby-lang
relix has joined #ruby-lang
funnel has joined #ruby-lang
MichD has joined #ruby-lang
nibbo_ has joined #ruby-lang
drbrain has joined #ruby-lang
wmoxam has joined #ruby-lang
Bwild_ has joined #ruby-lang
hachiya has joined #ruby-lang
llakey has joined #ruby-lang
error404 has joined #ruby-lang
certainty has joined #ruby-lang
eval-in has joined #ruby-lang
anekos_ has joined #ruby-lang
oddmunds has joined #ruby-lang
jsaak has joined #ruby-lang
MindfulMonk has joined #ruby-lang
samuelkadolph has joined #ruby-lang
<darix>
crankharder: require_relative
solars has quit [Ping timeout: 253 seconds]
ohsix has quit [Excess Flood]
ohsix has joined #ruby-lang
<crankharder>
odd. been bundling this thing for a while now on 1.9.3/2.0/2.1 without problems... I *think* this is the first time I've bundled on this computer with a new dev environment, which I'm sure is what triggered this
<darix>
crankharder: well
<darix>
do you have the rest of the error message?
<darix>
that might give an idea :)
thomasxie has joined #ruby-lang
<havenwood>
crankharder: "." was removed from $LOAD_PATH
<darix>
havenwood: that is unrelated to require_relative no?
<darix>
but was also a good change
<darix>
imho
<akahn>
jo__: no, just how to represent it in ruby objects. how to walk the links between pages in a way that prevents cycles and allows me to limit the maximum depth of the descent
anildigital is now known as zz_anildigital
<havenwood>
darix: well, related a little bit at least :P
<jo__>
before opening each url, look to see if there's a page with a matching current_url
<jo__>
oh and also you would want a depth variable for the page
jamo_ has quit [Ping timeout: 240 seconds]
<jo__>
does that answer your question?
brixen_ has joined #ruby-lang
brixen has quit [Excess Flood]
<jo__>
you will also need to deal with edge cases, like how to handle javascript, ads, external vs internal links, etc
<jo__>
and start small with maybe a depth of 1, then 2
skade has quit [Ping timeout: 240 seconds]
saltsa has quit [Ping timeout: 240 seconds]
Kuukunen has quit [Ping timeout: 240 seconds]
mbr has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: zzz]
Kuukunen- has joined #ruby-lang
kith_ is now known as kith
shinnya has joined #ruby-lang
__butch__ has joined #ruby-lang
ozzloy_ has joined #ruby-lang
charliesome has joined #ruby-lang
ozzloy has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby-lang
nathanstitt has joined #ruby-lang
relix has quit [Ping timeout: 255 seconds]
kek has quit [Ping timeout: 264 seconds]
michaeldeol has quit [Client Quit]
relix has joined #ruby-lang
<akahn>
I've gotten basically that far. but with the queue of URLs to check, how do I keep track of how deep I am?
mistym has quit [Remote host closed the connection]
diegoviola has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
<jo__>
well, i think you could do it functionally, or object oriented
bsvineeth has joined #ruby-lang
<jo__>
functionally, you have something like ParseUrl(array_of_urls, depth = 1, max_depth = 2) { if there's other urls and depth <= max_depth, then call ParseUrl(next_array_of_urls, depth += 1, max_depth)
j4cknewt has joined #ruby-lang
<jo__>
that's probably the easiest way
wallerdev has joined #ruby-lang
<akahn>
and as long as I don't go super deep I won't stack overflow?
yfeldblum has joined #ruby-lang
yell0wgh0st has quit [Quit: yell0wgh0st]
allomov has quit [Remote host closed the connection]
Sphynx has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
karamazo_ has joined #ruby-lang
Sphynx has joined #ruby-lang
rusty has joined #ruby-lang
karamazo_ has quit [Remote host closed the connection]
rusty is now known as Guest24483
michaeldeol has joined #ruby-lang
michaeldeol has quit [Client Quit]
Sphynx has quit [Remote host closed the connection]
Asher has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
<jo__>
you should be fine. if there are problems, bring them up here
knu has joined #ruby-lang
mkaesz has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
omosoj has quit [Ping timeout: 255 seconds]
centrx has joined #ruby-lang
sharpmachine has joined #ruby-lang
amsi has joined #ruby-lang
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
skade_ has quit [Quit: Computer has gone to sleep.]
cantonic has quit [Quit: cantonic]
bantic has joined #ruby-lang
karamazov has joined #ruby-lang
knu has quit [Remote host closed the connection]
Dev-Gitter has joined #ruby-lang
FarlaTux has joined #ruby-lang
amerine has joined #ruby-lang
PHP4Ever has joined #ruby-lang
momomomomo_ has joined #ruby-lang
nertzy has joined #ruby-lang
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
rcvalle has joined #ruby-lang
amerine_ has quit [Ping timeout: 240 seconds]
knu has joined #ruby-lang
Siyfion has quit []
Missphoenix has joined #ruby-lang
karamazov has quit [Remote host closed the connection]
amerine_ has joined #ruby-lang
bsvineeth has quit [Ping timeout: 260 seconds]
Miphix has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
amerine has quit [Ping timeout: 255 seconds]
pr0ton has joined #ruby-lang
cantonic has joined #ruby-lang
chussenot_ has joined #ruby-lang
knu has quit [Remote host closed the connection]
chussenot_ has quit [Client Quit]
oPaxa has quit [Ping timeout: 250 seconds]
chussenot has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 250 seconds]
amerine_ is now known as amerine
rheddry is now known as levifig
<levifig>
so, trying to execute a query using the pg gem and I'm not sure what the syntax is for using a variable in the query itself… Tried looking at the docs but not getting far…
<levifig>
shouldn't it be blabla.exec("SELECT yada FROM woohoo WHERE id > #{lastId}")?
pr0ton has quit [Quit: pr0ton]
<centrx>
levifig, Usually you want to use prepared statements or a library like an ORM that will escape and type cast the variable before interpolating it
bantic has quit [Ping timeout: 240 seconds]
<centrx>
levifig, Interpolating a variable like that directly into the SQL string is a security issue and often results in messy code
Squarepy has joined #ruby-lang
<levifig>
hmmm
mistym has joined #ruby-lang
jbardin has joined #ruby-lang
<levifig>
centrx, well, I'm just running a simple query on a command-line script :)