[ruby-core:62843] Re: [ruby-trunk - Bug #9882] [Open] Issue with hash string keys

From: Eric Wong <normalperson@...>
Date: 2014-05-30 00:46:58 UTC
List: ruby-core #62843
[email protected] wrote:
> I have the following code. In a nutshell i am slicing a string to pull out strings to use as keys in a hash. However when running the following code, I am getting odd results.
> context = "Marriott International World’s Most ADMIRED Lodging Company by FORTUNE for 14th yr. via @FortuneMagazine http://cnnmon.ie/1kcFZSQ"

The smart quote (’) character in context seems to have something to do
with it failing to match.  Using a normal single quote ('), everything
works as expected.

Other than that, I'm puzzled, too.  All strings show up as
Encoding::UTF-8 on my system.

In This Thread

Prev Next