Last modified: 2013-07-18 21:36:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53638, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51638 - ruby 1.9.3 syntax check choke on legitimate non-Latin characters
ruby 1.9.3 syntax check choke on legitimate non-Latin characters
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 20:56 UTC by Chris McMahon
Modified: 2013-07-18 21:36 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McMahon 2013-07-18 20:56:08 UTC
We have a browser test for the ULS IME feature that contains a Malayam text string.  https://gerrit.wikimedia.org/r/#/c/72365/ 

The test passes when run against test2wiki. 

But the linter in Jenkins reports a bogus failure and will not merge the branch to master.  https://integration.wikimedia.org/ci/job/qa-browsertests-ruby1.9.3lint/423/console

Can this be forced, or the linter updated or bypassed in order to merge this code?
Comment 1 Antoine "hashar" Musso (WMF) 2013-07-18 21:36:34 UTC
Seems like a ruby 1.9.3 issue :]

$ ruby1.8 -c uls_ime_steps.rb
Syntax OK


$ ruby1.9.3 -c  uls_ime_steps.rb 
uls_ime_steps.rb:46: invalid multibyte char (US-ASCII)
uls_ime_steps.rb:46: invalid multibyte char (US-ASCII)
uls_ime_steps.rb:46: syntax error, unexpected $end, expecting keyword_end
...ge).input_method_enabled == 'ഇൻസ്ക്രിപ്?...
...                               ^
$

We are using the version from Ubuntu Precise:

 *** 1.9.3.0-1ubuntu2.7 0

When copy pasting the sequence above, I do not have that issue:


$ irb1.9.3 
irb(main):001:0> puts 'ഇൻസ്ക്രിപ്'
ഇൻസ്ക്രിപ്
=> nil


Turns out ruby 1.9 is properly supporting unicode \O/  It just need an hint about the encoding being unicode and not US-ASCII:


 # encoding: utf-8
 puts 'ഇൻസ്ക്രിപ്റ്റ് 2

That pass :)

Followup on Gerrit change

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links