Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

refactor AS::Multibyte::Chars #4323

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

lest commented Jan 5, 2012

Don't need that all under ruby 1.9

Contributor

josevalim commented Jan 5, 2012

/cc @norman

@tenderlove tenderlove commented on the diff Jan 5, 2012

activesupport/lib/active_support/multibyte/chars.rb
begin
- @wrapped_string[0...byte_offset].unpack('U*').length
+ @wrapped_string.byteslice(0...byte_offset).unpack('U*').length
Contributor

norman commented Jan 5, 2012

Cool, actually I was just working on this exact same thing here:

https://github.com/norman/rails/tree/multibyte

I left for lunch with my branch failing exactly because of the issue with translate_offset which I assume this patch fixes.

Contributor

lest commented Jan 5, 2012

@norman I've looked through your commits, guess I've missed only return values for bang methods. Correct?

Contributor

norman commented Jan 5, 2012

@lest I've also changed a test that was looking for the wrong return value from #slice!. I merged your changes into my branch; let me know if you're going to keep on working on this some more so I don't waste time working on the same thing.

Contributor

lest commented Jan 5, 2012

@norman Please continue. I haven't anything else on it.

Contributor

norman commented Jan 5, 2012

@lest will do. Since you're masochistic enough to be interested in this, your feedback would be very welcome. :)

Owner

tenderlove commented Jan 5, 2012

@norman if you've pulled in @lest's commits, I'm going to close this pull request. Please send a new one when you're ready!

@tenderlove tenderlove closed this Jan 5, 2012

Contributor

norman commented Jan 5, 2012

@tenderlove will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment