Use of special character like @ in irb

Discussion in 'Ruby' started by mosar, Jul 21, 2008.

  1. mosar

    mosar Guest

    The version I use is 0.9.5. I want to code @ name = name(for example)
    but I cannot print the @. I I know that there is an option in the
    command line but I do not find it.
    Thanks for your help

    Jean Moser
     
    mosar, Jul 21, 2008
    #1
    1. Advertising

  2. mosar

    Glen Holcomb Guest

    [Note: parts of this message were removed to make it a legal post.]

    On Mon, Jul 21, 2008 at 4:04 AM, mosar <> wrote:

    > The version I use is 0.9.5. I want to code @ name = name(for example)
    > but I cannot print the @. I I know that there is an option in the
    > command line but I do not find it.
    > Thanks for your help
    >
    > Jean Moser
    >
    >

    I think your question has confused me however all you need to do to enter an
    @ sign in irb is hold shift and press '2'. You can't have a space between
    the @ and the rest of the token though.

    --
    "Hey brother Christian with your high and mighty errand, Your actions speak
    so loud, I can't hear a word you're saying."

    -Greg Graffin (Bad Religion)
     
    Glen Holcomb, Jul 21, 2008
    #2
    1. Advertising

  3. mosar

    Dejan Dimic Guest

    On Jul 21, 3:12 pm, Glen Holcomb <> wrote:
    > [Note:  parts of this message were removed to make it a legal post.]
    >
    > On Mon, Jul 21, 2008 at 4:04 AM, mosar <> wrote:
    > > The version I use is 0.9.5. I want to code @ name = name(for example)
    > > but I cannot print the @. I I know that there is  an option  in the
    > > command line but I do not find it.
    > > Thanks for your help

    >
    > > Jean Moser

    >
    > I think your question has confused me however all you need to do to enteran
    > @ sign in irb is hold shift and press '2'.  You can't have a space between
    > the @ and the rest of the token though.
    >
    > --
    > "Hey brother Christian with your high and mighty errand, Your actions speak
    > so loud, I can't hear a word you're saying."
    >
    > -Greg Graffin (Bad Religion)


    C:\>irb --version
    irb 0.9.5(05/04/13)

    C:\>irb
    irb(main):001:0> @name = "dejan"
    => "dejan"
    irb(main):002:0> p @name
    "dejan"
    => nil
    irb(main):003:0> def name
    irb(main):004:1> "dejan"
    irb(main):005:1> end
    => nil
    irb(main):006:0> @name = name
    => "dejan"
    irb(main):007:0> p @name
    "dejan"
    => nil
    irb(main):008:0> exit

    We obviously miss something in question?
    Very puzzling!?
     
    Dejan Dimic, Jul 21, 2008
    #3
  4. On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > I think your question has confused me however all you need to do to enter an
    > @ sign in irb is hold shift and press '2'. You can't have a space between
    > the @ and the rest of the token though.


    This assumes that every keyboard has an @ above the 2, which is not the
    case. The original poster seems to be French. Here's one example of a
    french keyboard layout:

    http://en.wikipedia.org/wiki/Keyboard_layout#French

    There was a thread about this a little while ago. Unfortunately, I
    don't remember what the outcome was. A little search might turn it up!

    Ben
     
    Ben Bleything, Jul 21, 2008
    #4
  5. mosar

    Glen Holcomb Guest

    [Note: parts of this message were removed to make it a legal post.]

    On Mon, Jul 21, 2008 at 10:09 AM, Ben Bleything <> wrote:

    > On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > > I think your question has confused me however all you need to do to enter

    > an
    > > @ sign in irb is hold shift and press '2'. You can't have a space

    > between
    > > the @ and the rest of the token though.

    >
    > This assumes that every keyboard has an @ above the 2, which is not the
    > case. The original poster seems to be French. Here's one example of a
    > french keyboard layout:
    >
    > http://en.wikipedia.org/wiki/Keyboard_layout#French
    >
    > There was a thread about this a little while ago. Unfortunately, I
    > don't remember what the outcome was. A little search might turn it up!
    >
    > Ben
    >
    >

    Good point. I was thinking the numbers were fairly standard. I still think
    the language barrier popped up in the entirety of the question it's self
    before I started being Ameri-centric.

    --
    "Hey brother Christian with your high and mighty errand, Your actions speak
    so loud, I can't hear a word you're saying."

    -Greg Graffin (Bad Religion)
     
    Glen Holcomb, Jul 21, 2008
    #5
  6. mosar

    mosar Guest

    On 21 juil, 18:51, Glen Holcomb <> wrote:
    > [Note: parts of this message were removed to make it a legal post.]
    >
    >
    >
    > On Mon, Jul 21, 2008 at 10:09 AM, Ben Bleything <> wrote:
    > > On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > > > I think your question has confused me however all you need to do to enter

    > > an
    > > > @ sign in irb is hold shift and press '2'. You can't have a space

    > > between
    > > > the @ and the rest of the token though.

    >
    > > This assumes that every keyboard has an @ above the 2, which is not the
    > > case. The original poster seems to be French. Here's one example of a
    > > french keyboard layout:

    >
    > > http://en.wikipedia.org/wiki/Keyboard_layout#French

    >
    > > There was a thread about this a little while ago. Unfortunately, I
    > > don't remember what the outcome was. A little search might turn it up!

    >
    > > Ben

    >
    > Good point. I was thinking the numbers were fairly standard. I still think
    > the language barrier popped up in the entirety of the question it's self
    > before I started being Ameri-centric.
    >
    > --
    > "Hey brother Christian with your high and mighty errand, Your actions speak
    > so loud, I can't hear a word you're saying."
    >
    > -Greg Graffin (Bad Religion)


    Thanks for your information.As a matter of fact I have a swiss
    keyboard. On the third key I have " (2nd level), 2 and @ on the first
    level.I use Scite to write my programs and the @ character is
    acessible.When I switch to irb (in the shell) when I strike on @
    nothing happens.It seems that inside irb I should change the keyboard
    layout ?
    Hi Brothers, how difficult is the climbing of Babel Tower but how nice
    is the variety of languages !
     
    mosar, Jul 22, 2008
    #6
  7. mosar

    Glen Holcomb Guest

    [Note: parts of this message were removed to make it a legal post.]

    On Tue, Jul 22, 2008 at 3:24 AM, mosar <> wrote:

    > On 21 juil, 18:51, Glen Holcomb <> wrote:
    > > [Note: parts of this message were removed to make it a legal post.]
    > >
    > >
    > >
    > > On Mon, Jul 21, 2008 at 10:09 AM, Ben Bleything <>

    > wrote:
    > > > On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > > > > I think your question has confused me however all you need to do to

    > enter
    > > > an
    > > > > @ sign in irb is hold shift and press '2'. You can't have a space
    > > > between
    > > > > the @ and the rest of the token though.

    > >
    > > > This assumes that every keyboard has an @ above the 2, which is not the
    > > > case. The original poster seems to be French. Here's one example of a
    > > > french keyboard layout:

    > >
    > > > http://en.wikipedia.org/wiki/Keyboard_layout#French

    > >
    > > > There was a thread about this a little while ago. Unfortunately, I
    > > > don't remember what the outcome was. A little search might turn it up!

    > >
    > > > Ben

    > >
    > > Good point. I was thinking the numbers were fairly standard. I still

    > think
    > > the language barrier popped up in the entirety of the question it's self
    > > before I started being Ameri-centric.
    > >
    > > --
    > > "Hey brother Christian with your high and mighty errand, Your actions

    > speak
    > > so loud, I can't hear a word you're saying."
    > >
    > > -Greg Graffin (Bad Religion)

    >
    > Thanks for your information.As a matter of fact I have a swiss
    > keyboard. On the third key I have " (2nd level), 2 and @ on the first
    > level.I use Scite to write my programs and the @ character is
    > acessible.When I switch to irb (in the shell) when I strike on @
    > nothing happens.It seems that inside irb I should change the keyboard
    > layout ?
    > Hi Brothers, how difficult is the climbing of Babel Tower but how nice
    > is the variety of languages !
    >
    >

    Can you get the @ sign in the shell you launch irb from?

    --
    "Hey brother Christian with your high and mighty errand, Your actions speak
    so loud, I can't hear a word you're saying."

    -Greg Graffin (Bad Religion)
     
    Glen Holcomb, Jul 22, 2008
    #7
  8. mosar

    mosar Guest

    On 22 juil, 15:13, Glen Holcomb <> wrote:
    > [Note: parts of this message were removed to make it a legal post.]
    >
    >
    >
    > On Tue, Jul 22, 2008 at 3:24 AM, mosar <> wrote:
    > > On 21 juil, 18:51, Glen Holcomb <> wrote:
    > > > [Note: parts of this message were removed to make it a legal post.]

    >
    > > > On Mon, Jul 21, 2008 at 10:09 AM, Ben Bleything <>

    > > wrote:
    > > > > On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > > > > > I think your question has confused me however all you need to do to

    > > enter
    > > > > an
    > > > > > @ sign in irb is hold shift and press '2'. You can't have a space
    > > > > between
    > > > > > the @ and the rest of the token though.

    >
    > > > > This assumes that every keyboard has an @ above the 2, which is not the
    > > > > case. The original poster seems to be French. Here's one example of a
    > > > > french keyboard layout:

    >
    > > > > http://en.wikipedia.org/wiki/Keyboard_layout#French

    >
    > > > > There was a thread about this a little while ago. Unfortunately, I
    > > > > don't remember what the outcome was. A little search might turn it up!

    >
    > > > > Ben

    >
    > > > Good point. I was thinking the numbers were fairly standard. I still

    > > think
    > > > the language barrier popped up in the entirety of the question it's self
    > > > before I started being Ameri-centric.

    >
    > > > --
    > > > "Hey brother Christian with your high and mighty errand, Your actions

    > > speak
    > > > so loud, I can't hear a word you're saying."

    >
    > > > -Greg Graffin (Bad Religion)

    >
    > > Thanks for your information.As a matter of fact I have a swiss
    > > keyboard. On the third key I have " (2nd level), 2 and @ on the first
    > > level.I use Scite to write my programs and the @ character is
    > > acessible.When I switch to irb (in the shell) when I strike on @
    > > nothing happens.It seems that inside irb I should change the keyboard
    > > layout ?
    > > Hi Brothers, how difficult is the climbing of Babel Tower but how nice
    > > is the variety of languages !

    >
    > Can you get the @ sign in the shell you launch irb from?
    >
    > --
    > "Hey brother Christian with your high and mighty errand, Your actions speak
    > so loud, I can't hear a word you're saying."
    >
    > -Greg Graffin (Bad Religion)


    Sorry but I have to answer no.
    Jean Moser
     
    mosar, Jul 22, 2008
    #8
  9. mosar

    Glen Holcomb Guest

    [Note: parts of this message were removed to make it a legal post.]

    On Tue, Jul 22, 2008 at 9:54 AM, mosar <> wrote:

    > On 22 juil, 15:13, Glen Holcomb <> wrote:
    > > [Note: parts of this message were removed to make it a legal post.]
    > >
    > >
    > >
    > > On Tue, Jul 22, 2008 at 3:24 AM, mosar <> wrote:
    > > > On 21 juil, 18:51, Glen Holcomb <> wrote:
    > > > > [Note: parts of this message were removed to make it a legal post.]

    > >
    > > > > On Mon, Jul 21, 2008 at 10:09 AM, Ben Bleything <>
    > > > wrote:
    > > > > > On Mon, Jul 21, 2008, Glen Holcomb wrote:
    > > > > > > I think your question has confused me however all you need to do

    > to
    > > > enter
    > > > > > an
    > > > > > > @ sign in irb is hold shift and press '2'. You can't have a

    > space
    > > > > > between
    > > > > > > the @ and the rest of the token though.

    > >
    > > > > > This assumes that every keyboard has an @ above the 2, which is not

    > the
    > > > > > case. The original poster seems to be French. Here's one example

    > of a
    > > > > > french keyboard layout:

    > >
    > > > > > http://en.wikipedia.org/wiki/Keyboard_layout#French

    > >
    > > > > > There was a thread about this a little while ago. Unfortunately, I
    > > > > > don't remember what the outcome was. A little search might turn it

    > up!
    > >
    > > > > > Ben

    > >
    > > > > Good point. I was thinking the numbers were fairly standard. I

    > still
    > > > think
    > > > > the language barrier popped up in the entirety of the question it's

    > self
    > > > > before I started being Ameri-centric.

    > >
    > > > > --
    > > > > "Hey brother Christian with your high and mighty errand, Your actions
    > > > speak
    > > > > so loud, I can't hear a word you're saying."

    > >
    > > > > -Greg Graffin (Bad Religion)

    > >
    > > > Thanks for your information.As a matter of fact I have a swiss
    > > > keyboard. On the third key I have " (2nd level), 2 and @ on the first
    > > > level.I use Scite to write my programs and the @ character is
    > > > acessible.When I switch to irb (in the shell) when I strike on @
    > > > nothing happens.It seems that inside irb I should change the keyboard
    > > > layout ?
    > > > Hi Brothers, how difficult is the climbing of Babel Tower but how nice
    > > > is the variety of languages !

    > >
    > > Can you get the @ sign in the shell you launch irb from?
    > >
    > > --
    > > "Hey brother Christian with your high and mighty errand, Your actions

    > speak
    > > so loud, I can't hear a word you're saying."
    > >
    > > -Greg Graffin (Bad Religion)

    >
    > Sorry but I have to answer no.
    > Jean Moser
    >
    >
    >

    It sounds like your keyboard is mapped differently on the console than it is
    in your GUI, which is what I expected. I think irb should use the same
    keyboard mapping as your console/shell/terminal since that is what launches
    the irb process. The best advice I can give is to try and figure out how to
    change the mapping on your terminal/console. I would think that if you can
    get an @ sign there you will be able to get it in irb.

    --
    "Hey brother Christian with your high and mighty errand, Your actions speak
    so loud, I can't hear a word you're saying."

    -Greg Graffin (Bad Religion)
     
    Glen Holcomb, Jul 22, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Kowalzick
    Replies:
    5
    Views:
    477
    Patrick Kowalzick
    Mar 14, 2006
  2. nagrik
    Replies:
    6
    Views:
    421
    Richard Herring
    Jul 24, 2006
  3. Sam Stephenson
    Replies:
    1
    Views:
    228
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    161
    Florian Groß
    Oct 26, 2005
  5. anne001
    Replies:
    1
    Views:
    277
    anne001
    Jun 27, 2006
Loading...

Share This Page