[ 
https://issues.apache.org/jira/browse/THRIFT-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695089#action_12695089
 ] 

Michael Stockton commented on THRIFT-276:
-----------------------------------------

bq. The 'encoding:' lines are for 1.9?

Correct, the magic comment "# encoding: ascii-8bit" sets the default encoding.  
Without it, spec tests that use literal string comparisons do not match 
anything read off the wire.  By default, everything in ruby1.9 is UTF-8 and we 
can certainly enforce that with a little more effort.  If not, though, it will 
be pretty easy to merely support Thrift's UTF-8 string type in 1.9 because it's 
possible to mix-and-match encodings.

stockton ~ % irb1.9 -E ascii-8bit
irb(main):001:0> String.new("foo").encoding.name
=> "ASCII-8BIT"
irb(main):003:0> String.new("foo").encode("utf-8").encoding.name
=> "UTF-8"

stockton ~ % irb1.9              
irb(main):001:0> String.new("foo").encoding.name
=> "UTF-8"


> Ruby libraries should have one class per file
> ---------------------------------------------
>
>                 Key: THRIFT-276
>                 URL: https://issues.apache.org/jira/browse/THRIFT-276
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Ruby)
>    Affects Versions: 0.1
>            Reporter: Bryan Duxbury
>            Assignee: Michael Stockton
>            Priority: Trivial
>         Attachments: thrift-276-v2.patch, thrift-276-v3.patch, 
> thrift-276-v4.patch, thrift-276.patch
>
>
> There's no reason for so many of our classes to be lumped into the same file. 
> For instance, transport.rb contains 9 classes. They may be short, but 
> organizationally, it's superior to have separate class files. Of course, some 
> files may contain more than one class per file as appropriate - things like a 
> protocol and its factory, for instance, are perfectly acceptable to group.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to