Speech marks ""

Asked by programmingmaster over 1 year ago

When I do this

keypress do |k| para"#{k.inspect}" end

everything always has a speech mark before and after eg:"h" "e" "l" "l" "o"

Why? And how do I stop that?

3 responses

  • doesent work NOOOOOOO!

  • cyber says

    I don't know why, but you could remove the " with gsub:

    Shoes.app do keypress do |k| para k.inspect.gsub('"', "") end end

  • lljk says

    i believe this has to do with the inspect method, which places things in quotes...

    try this to see the keypresses without quotes:

    keypress do |k| para k end

    • j