[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Workaround for 1.8.6 with CommandLine

Jim Freeze

3/30/2007 1:52:00 PM

Hello

If you are using ruby-1.8.6, you may have noticed a bug where exit
always
returns 0 when called from within an at_exit block. You can test this
on your
machine with the following little snippet:

ruby -e 'at_exit { exit(1) }' ; echo $?

The result should be '1', but ruby-1.8.6 will return '0'.

To workaround this when using commandline, you can change an application
that reads like:

require 'rubygems'
require 'commandline'
class App < CommandLine::Application
end

to

require 'rubygems'
require 'commandline'
class App < CommandLine::Application_wo_AutoRun
end
App.run

This will not use the at_exit technique of self launching the app and
give the correct
exit code.

Jim


24 Answers

Ara.T.Howard

3/30/2007 2:51:00 PM

0

Jim Freeze

3/30/2007 3:33:00 PM

0

On 3/30/07, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Fri, 30 Mar 2007, Jim Freeze wrote:
>
> wow. i rely on that combination in a few places, in particular i dis-inherit
> exit
> handlers in child processes by doing this as the first line
>
> at_exit{ exit! status }
>
> do you know if it's a bug or new behaviour?

As I understand it (and according to Nathaniel Talbot), it is a bug
and breaks testunit.
See bug 9300 at:

http://rubyforge.org/tracker/?func=detail&atid=1698&aid=9300&gr...



--
Jim Freeze

Ara.T.Howard

3/30/2007 4:16:00 PM

0

Ara.T.Howard

3/30/2007 5:33:00 PM

0

Nobuyoshi Nakada

4/2/2007 1:11:00 PM

0

Hi,

At Sat, 31 Mar 2007 02:02:11 +0900,
Alexey Verkhovsky wrote in [ruby-talk:246032]:
> It's a bug. Already fixed in 1.9, but I haven't heard anything about
> applying the fix to 1.8 branch yet. Which is unfortunate, as it breaks quite
> a few things.

It was fixed in 1.8, and doesn't exist in 1.9.

--
Nobu Nakada

Dan

3/3/2012 3:27:00 AM

0

If you make the POD early enough both are perfectly viable candidates for their reflective parties. So instead of Obama makes a great speech at Dem convention in 2004 it is Gore, and 'who really won in 2000' and when Kerry goes down to defeat Gore is pushed.

Condi ( and Colin Powell) at various times were pushed to run for elective office, but part of the reason neither did is the Republican Party is still home of the what was at the time segregationist Southern Democrats, that part of the party and population would struggle to accept a Black candidate even one with an R after their name.

In 2008 all other things being equal it was going to be a Democratic year, Iraq war increasingly seen as a mistake and economy falls off a cliff, so presumably Gore wins.

In terms of voters a lot of Blcks do not vote but of those who do 90% vote D, the first viable Viable Black candidate for either political party reinforced that so % of black voters voting for Obama went up marginally compared with voting for Kerry or Gore in 2000 because there was no were else to go as it was already 90% plus. What helped him was the increased participation rates of black voters who historically would not have turned out. In a Gore v Condi scenario, the factors are pulling in the opposite direction, viable Black candidate, but she is a Republican, regularDemocratic voters are not suddenly going to become Republicans but those extra voters that Obama got to turn up and vote are not going to turn up for Gore and some will vote for Condi.

The impact will be at the margins, the game changer idea of democratic women wanted Hilarry, democratic women are upset with Obama, quick make a women VP candidate, (Palin) and they will all become Republican women did not work, and was never going to.

If Gore wins it becomes an interesting footnote in history that the Republicans were the first party to nominate a women or a Black candidate but as she goes down to defeat, the party retreats to a Southen old, white male base, as now. Rather than expand the party to reach Blacks and Hispanics, you bring in stricter voter ID rules to stop them voting. However if she had won, you would see pushed much harder the Karl Rove vision of the party needs to adapt to a changing nation and let's go get the votes of Blacks and Hispanics etc etc.

David Tenner

3/3/2012 4:42:00 AM

0

Daniel Titley <aber80@gmail.com> wrote in
news:85a7dee1-ec45-4ded-8ab1-984b61aa25f6@c21g2000yqi.googlegroups.com :

> On Mar 2, 8:06?am, john0714 <john0...@aol.com> wrote:
>> Bill Maher, amongst others, seems to think much of the dislike of
>> President Obama is due to race. Now they should consider this: Suppose
>> Condoleezza Rice had run against Al Gore in 2008? Who would most of
>> the people who IOTL voted against Barack Obama when he ran in 2008 and
>> intend to vote against him in 2012 have voted for?
>
> Al Gore in 2008? How does that happen?
>

If he had run, it is conceivable though not very likely that he could have
gotten the Democratic nomination. Most polls that mentioned him in 2006 and
2007 showed him well behind Hillary Clinton and sometimes though not always
behind Barack Obama. http://www.pollingreport.com/wh... (Of course
early polls are notoriously bad predictors--not that they are meant to be
predictors, anyway--because they are largely tests of name recognition. But
it is precisely this that makes me dubious about Gore's prospects, because he
was as well-known as any Democratic candidate in 2006-2007.)

I think Rice would have been a longer shot for the GOP nomination than Gore
for the Democrats. That is not primarily because Rice was black and a woman
but because she (a) had never held (or even run for) elective office, [1] and
(b) was in her own words "mildly pro-choice" on abortion.

[1] Yes, the GOP had on occasion nominated candidates without electoral-
office experience--Grant, Taft, Hoover, Willkie, and Eisenhower. But note
that except for Taft (who got the nomination mainly because he was TR's
choice) and Willkie (who was chosen under very unusual circumstances when the
fall of France had rendered the isolationism of most of the established GOP
candidates questionable) they were either military heroes or, in the case of
Hoover, a humanitarian hero (as well as a man closely associated in the
public mind with the prosperity of the 1920's). Also, Hoover and Willkie had
been businessmen, a profession highly respected by Republicans. Finally, note
that the last of these candidates left the White House in January 1961,
almost a half century before 2008...

--
David Tenner
dtenner@ameritech.net

Felix Reuthner

3/4/2012 9:35:00 PM

0

Bradipus wrote:

> Was Rice married?

According to her wiki article, she remains unmarried to this day and
keeps her private life very private. I don't think that the GOP base
would have liked the combination of female, black and single.

Felix

john0714@aol.com

3/5/2012 7:31:00 AM

0

On Mar 2, 10:41 pm, David Tenner <dten...@ameritech.net> wrote:
> Daniel Titley <abe...@gmail.com> wrote innews:85a7dee1-ec45-4ded-8ab1-984b61aa25f6@c21g2000yqi.googlegroups.com:
>
> > On Mar 2, 8:06 am, john0714 <john0...@aol.com> wrote:
> >> Bill Maher, amongst others, seems to think much of the dislike of
> >> President Obama is due to race. Now they should consider this: Suppose
> >> Condoleezza Rice had run against Al Gore in 2008? Who would most of
> >> the people who IOTL voted against Barack Obama when he ran in 2008 and
> >> intend to vote against him in 2012 have voted for?
>
> > Al Gore in 2008? How does that happen?
>
> If he had run, it is conceivable though not very likely that he could have
> gotten the Democratic nomination.  Most polls that mentioned him in 2006 and
> 2007 showed him well behind Hillary Clinton and sometimes though not always
> behind Barack Obama.  http://www.pollingreport.com/wh08dem2...(Of course
> early polls are notoriously bad predictors--not that they are meant to be
> predictors, anyway--because they are largely tests of name recognition.  But
> it is precisely this that makes me dubious about Gore's prospects, because he
> was as well-known as any Democratic candidate in 2006-2007.)
>
> I think Rice would have been a longer shot for the GOP nomination than Gore
> for the Democrats.  That is not primarily because Rice was black and a woman
> but because she (a) had never held (or even run for) elective office, [1] and
> (b) was in her own words "mildly pro-choice" on abortion.
>
> [1] Yes, the GOP had on occasion nominated candidates without electoral-
> office experience--Grant, Taft, Hoover, Willkie, and Eisenhower.  But note
> that except for Taft (who got the nomination mainly because he was TR's
> choice) and Willkie (who was chosen under very unusual circumstances when the
> fall of France had rendered the isolationism of most of the established GOP
> candidates questionable) they were either military heroes or, in the case of
> Hoover, a humanitarian hero (as well as a man closely associated in the
> public mind with the prosperity of the 1920's).  Also, Hoover and Willkie had
> been businessmen, a profession highly respected by Republicans. Finally, note
> that the last of these candidates left the White House in January 1961,
> almost a half century before 2008...
>
> --
> David Tenner
> dten...@ameritech.net

Could we get off the "how" and back to the "what-if?" IMHO Maher, as
big a I am fan of his, is all wrong on this. I wanted to put the
question to you all simply in the form of a simple thought experiment
to get some intelligent liberals and farther leftists, which I suppose
most of you are, to cogently discuss the yeas and nays of my premise.
Instead you are hanging me up with "how."Can't you just go with it?
PLEASE!!!

amia9018

3/5/2012 6:32:00 PM

0

On Monday 05 March 2012 00:31, john0714 (john0714@aol.com) opined:

<snip>
> Could we get off the "how" and back to the "what-if?" IMHO Maher, as
> big a I am fan of his, is all wrong on this. I wanted to put the
> question to you all simply in the form of a simple thought experiment
> to get some intelligent liberals and farther leftists, which I suppose
> most of you are, to cogently discuss the yeas and nays of my premise.
> Instead you are hanging me up with "how."Can't you just go with it?
> PLEASE!!!

I'd humbly submit that the "how" to which you object is an essential part
of the "what-if", especially in questions involving politics. There must
first be a realistic path for Al Gore to have become the Democrat nominee
in 2008, just as there must be one for Condi Rice. In determining
that/those paths, there must be some discussion of HOW the individuals in
question reached that point.

Personally, I don't see Gore becoming the Dem nominee under any
circumstance after losing in 2000 and not being nominated in 2004, which
would, in my opinion, have represented his best opportunity. While there
was name recognition in '08, that was largely because of his activities in
the global warming "discussion" and not for his continued participation in
national politics. As for Rice, she removed herself from consideration
OTL and I frankly don't see her changing her position ATL. I think she is
smart enough to realize the hurdles she'd face, even if she were
interested, and I certainly don't believe the GOP would've nominated her
against her wishes.

Assuming a matchup such as you suggest, I think it likely that those groups
that "traditionally" vote for either party would, in large part, continue
with that pattern of behavior: the black vote would be about 90%
Democrat, with a few crossing party lines to vote for Rice because she's
black, a few conservative southern whites voting against her because she's
black AND female, and so on. The net result would be, as we see in OTL,
that the 20% or so "independents" would control the outcome of the
election.

That independent group is hard to characterize, IMO, because it consists
not only of the genuinely non-aligned but of the late deciders and the
uninformed, as well. The non-aligned would, I suggest, base their vote
more on the party platforms as expressed by the candidates than on issues
of race and gender, while the latter groups would be more inclined to do
the opposite or vote on the basis of personality and individual charisma
than on any basis of policy/platform. The result would be, I think, a
close race. I'd like to think Rice would win, but don't know whether
that's my dislike for Gore speaking.

Swell Ol' Bob

--
Robert G. Melson | Rio Grande MicroSolutions | El Paso, Texas
-----
The greatest tyrannies are always perpetrated
in the name of the noblest causes -- Thomas Paine