[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

string.tr bug?

borasque@borasque.com

1/18/2009 7:24:00 AM

Greetings,
I found strange behaviour of string.tr:

p "=+=/=".tr("+/=", ",-@")
got ".,.-."
expected "@,@-@"

Is this bug in ruby?
24 Answers

Sebastian Hungerecker

1/18/2009 9:52:00 AM

0

borasque@borasque.com wrote:
> I found strange behaviour of string.tr:
>
> p "=+=/=".tr("+/=", ",-@")
> got ".,.-."
> expected "@,@-@"
>
> Is this bug in ruby?

It's not a bug. For tr ",-@" is the same as ",-./0123456789:;<=>?@". You have
to escape the - to use it as a literal "-":
"=+=/=".tr("+/=", ',\-@') #=> "@,@-@"

HTH,
Sebastian
--
Jabber: sepp2k@jabber.org
ICQ: 205544826

thinbluemime

7/3/2014 2:26:00 PM

0

On Thu, 03 Jul 2014 10:07:16 -0400, Arthur Lipscomb
<arthur@alum.calberkeley.org> wrote:

> Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
> said it was. There wasn't even anything to snark at. So did the town
> double or triple in size between seasons?


It's only been two weeks since the dome appeared. I loved how "The Girl
with the Dragon Nostril", aka, Big Red, was able to do the breast stroke
and CPR after being released from the ER with a gunshot wound to her
breast.

This show is more like a cartoon than a science fiction drama.
Unfortunately for the Dome and the King of pop-culture, The Simpsons did
it hundreds of times better.

--
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not consent
to the retrieving or storing of this communication and any related
metadata, as well as printing, copying, re-transmitting, disseminating, or
otherwise using it. If you believe you have received this communication in
error, please delete it immediately.

Anim8rFSK

7/3/2014 2:49:00 PM

0

In article <lp3o2k$kf3$1@dont-email.me>,
Arthur Lipscomb <arthur@alum.calberkeley.org> wrote:

> Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
> said it was. There wasn't even anything to snark at. So did the town
> double or triple in size between seasons?

From the science teacher's model, the Dumb itself shrank to about 1/4
it's size and relocated it's center as well.

> Star Trek TNG (Season 6 blu-ray) -
>
> Relics - Scotty is rescued after 75 years in a transporter buffer. Fun
> episode. You just have to ignore all the plot holes and continuity
> problems. There was an OK commentary detailing the many problems the
> writers had over the years including any TOS references in the show and
> how from time to time they would try to sneak TOS references into the
> scripts and hope the suits wouldn't notice. Also a pretty good deleted
> scene where Scotty meets Troi and slowly horrifically realizes she's a
> psychologist. The way the scene played out, I think he might have
> thought she was the ship's prostitute. Although once he figured out
> what she really was it was clearly far worse.

Ah HAH! I've always wondered why she's saying a fond farewell to Scotty
at the end, when she never meets him in the damned episode. And, for
that matter, why the Hell she isn't assigned to show him around; it's
not like she has anything better to do. Thanks!

--
Wait - are you saying that ClodReamer was wrong, or lying?

icebreaker

7/3/2014 3:35:00 PM

0

On Thu, 03 Jul 2014 07:07:16 -0700, Arthur Lipscomb
<arthur@alum.calberkeley.org> wrote:

>Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
>said it was. There wasn't even anything to snark at. So did the town
>double or triple in size between seasons?
>
>
>Through the Wormhole - "Is Gravity an Illusion?" - Wormhole returns to
>its' roots with a hard science episode focusing on gravity, black holes
>and alternate realities.
>
>
>Big Brother - The power of veto competition and a failed attempt at an
>alliance.
>
>
>Degrassi - "Hypotize" - Tristan and Mr. Yates finally goes there after
>Mr. Yates invites Tristan over to his apartment. This is clearly not
>going to end well.

No and it's disgusting. Degrassi is off the rails. There is never
anything good that happens to anyone any longer in this series. At
least Imogen is crushing hard for Jack. (Jack's a female for those
that don't know).

Thanatos

7/3/2014 5:29:00 PM

0

In article <op.xifed9k6onfjik@experience.woh.rr.com>,
thinbluemime2 <thinbluemime2@gmail.com> wrote:

> On Thu, 03 Jul 2014 10:07:16 -0400, Arthur Lipscomb
> <arthur@alum.calberkeley.org> wrote:
>
> > Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
> > said it was. There wasn't even anything to snark at. So did the town
> > double or triple in size between seasons?
>
>
> It's only been two weeks since the dome appeared. I loved how "The Girl
> with the Dragon Nostril", aka, Big Red, was able to do the breast stroke
> and CPR after being released from the ER with a gunshot wound to her
> breast.

I thought it was hilarious that she sees a girl, apparently in distress
out in the middle of a lake, and she decides to swim several hundred
yards to go get her rather than, you know, take the boat she's standing
right next to.

Michael Black

7/3/2014 5:33:00 PM

0

number6

7/3/2014 5:40:00 PM

0

On Thursday, July 3, 2014 1:29:04 PM UTC-4, BTR1701 wrote:

>
> I thought it was hilarious that she sees a girl, apparently in distress
>
> out in the middle of a lake, and she decides to swim several hundred
>
> yards to go get her rather than, you know, take the boat she's standing
>
> right next to.

Training for the wet T-Shirt contest probably ...

Anim8rFSK

7/3/2014 6:22:00 PM

0

In article <atropos-2E654C.10290303072014@news-europe.giganews.com>,
BTR1701 <atropos@mac.com> wrote:

> In article <op.xifed9k6onfjik@experience.woh.rr.com>,
> thinbluemime2 <thinbluemime2@gmail.com> wrote:
>
> > On Thu, 03 Jul 2014 10:07:16 -0400, Arthur Lipscomb
> > <arthur@alum.calberkeley.org> wrote:
> >
> > > Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
> > > said it was. There wasn't even anything to snark at. So did the town
> > > double or triple in size between seasons?
> >
> >
> > It's only been two weeks since the dome appeared. I loved how "The Girl
> > with the Dragon Nostril", aka, Big Red, was able to do the breast stroke
> > and CPR after being released from the ER with a gunshot wound to her
> > breast.
>
> I thought it was hilarious that she sees a girl, apparently in distress
> out in the middle of a lake, and she decides to swim several hundred
> yards to go get her rather than, you know, take the boat she's standing
> right next to.

Meanwhile the cries for help carry far far away into the lost wilderness
the EMT is hiding in, and he comes running ...

--
Wait - are you saying that ClodReamer was wrong, or lying?

Anim8rFSK

7/3/2014 6:23:00 PM

0

In article <alpine.LNX.2.02.1407031331500.4320@darkstar.example.org>,
Michael Black <et472@ncf.ca> wrote:

> On Thu, 3 Jul 2014, anim8rFSK wrote:
>
> > In article <lp3o2k$kf3$1@dont-email.me>,
> > Arthur Lipscomb <arthur@alum.calberkeley.org> wrote:
> >
> >> Under the Dome - "Heads Will Roll" - Wow, this *was* as bad as everyone
> >> said it was. There wasn't even anything to snark at. So did the town
> >> double or triple in size between seasons?
> >
> > From the science teacher's model, the Dumb itself shrank to about 1/4
> > it's size and relocated it's center as well.
> >
> Maybe she just doesn't have the figures yet. She was off in her corner
> making the model, while the Kid and his friend were actually doing the
> survey.
>
> Michael

LOL, so she just made a completely inaccurate model, for fun? That
would be about right for this (why does it have to be a model anyway and
not just a map?). It would have been *so* nice if she'd build this
based on the kids' survey.

--
Wait - are you saying that ClodReamer was wrong, or lying?

Michael Black

7/3/2014 6:48:00 PM

0