Thanks for the input. I found that as a workaround, calling .all() on the end of the query gives me the datas I'm looking for.
Thanks for looking! Daniel > Message: 3 > Date: Sat, 9 Apr 2011 16:55:45 -0700 > From: Morgan Schweers <cyber...@gmail.com> > To: "MacRuby development discussions." > <macruby-devel@lists.macosforge.org> > Subject: Re: [MacRuby-devel] MacRuby 0.10 Sqlite3 and Sequel > Message-ID: <BANLkTi=r_2Q_WYhamf-OHpNCmPzXk8=0...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Greetings, > It is a pretty reduced test case, in fact. > > I dug into it briefly, but it quickly went over my head... It's clear > there's a difference in how the stack is unwound when a block return > happens > eight-ish levels down, between the two. It looks like in MRI code that is > later in methods that are being unwound is _NOT_ executed, but in MacRuby, > that code _IS_ being executed. I can't seem to make an example, although > that's what I'm seeing when I run the gist provided with a ton of debugging > in place. > > What I'm seeing is that in > ${SEQUEL_GEM}/lib/sequel/dataset/action.rb#single_record both the 'return' > in the block, and the nil at the end are being executed, when only one > should be. (In MRI 1.9.2, only the return in the block is executed, not > the > nil at the end.) That's pretty much where I lost the plot; I don't know > why > it's behaving differently right there. > > A tiny tweak to #single_record made it work, but it does look like it's a > MacRuby issue. > > -- Morgan > > On Sat, Apr 9, 2011 at 7:58 AM, Eloy Duran <eloy.de.en...@gmail.com> > wrote: > > > If it works on MRI but not on MacRuby it's a bug. Unless someone > > with MacRuby +Sequel experience can give you a workaround, the only > course > > of action would be to create a simple self contained reduction, by > hunting > > down the code in Sequel that's broken on MacRuby and create a ticket with > > the reduction. > > > > HTH > > > > On 9 apr 2011, at 02:55, Daniel Westendorf wrote: > > > > Hi all, > > > > I'm not able to query a Sqlite database using MacRuby and Sequel. > Consider > > the following gist: https://gist.github.com/910989 > > > > macruby => 0.10 > > sequel => 3.22.0 > > sqlite3 => 1.3.3 > > > > I get a response from the the db when I select ALL the rows, but not when > I > > query for one record. It works with MRI 1.9.2. Am I doing something > wrong, > > or is this a bug? Does anyone have some suggestions on what I should do > to > > troubleshoot this or work around it? > > > > Thanks, > > > > Daniel >
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel