General

Profile

mike (Michael Selig)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 10 10

Activity

09/22/2010

03:34 PM Ruby Bug #3855 (Closed): String#rindex extremely slow on long UTF8 strings
=begin
Not really a bug .....
I think this issue was raised a few months ago, but I have done a very simple patch to string.c to fix the problem.

Example:

ruby -e 'p String.new("XXX\u0639" + "X" * 100000).rindex("\u0639")'
...
mike (Michael Selig)

03/27/2009

07:36 AM Ruby Bug #1317: Creating a range with strings
=begin
This is a (possibly confusing) consequence of the behaviour of String#next.
For most sortable objects, the following is true:

obj.next > obj

but not for strings. For example:

"9".next => "10"
but
"10" > "9" =...
mike (Michael Selig)

02/25/2009

08:00 AM Ruby Bug #1203 (Closed): IO#gets ignores the limit parameter when sep is nil
=begin
According to the doc f.gets(nil) returns the rest of the file. This works fine. But the doc also says that "limit" should restrict the length of the character string returned. Therefore I expect
f.gets(nil, 10)
to return...
mike (Michael Selig)

02/05/2009

08:07 AM Ruby Feature #1106: Script encoding vs. default_internal: Implicitly transcode strings/regexps
=begin
There were a number of quite long discussions about String (and Regexp) literal encodings (as well as other encoding compatibility issues) last year.
The decisions (as I recall) were:
- There should be NO silent transcoding i...
mike (Michael Selig)

02/04/2009

08:27 AM Ruby Feature #908: Should be an easy way of reading N characters from am I/O stream
=begin
I have a simple use-case:

Existing datafile has fixed length records, currently single-byte chars. I want to convert the application (which is quite old) to support multi-byte characters, but I don't want to have to go to th...
mike (Michael Selig)

12/29/2008

01:07 PM Ruby Bug #942: Build fails on IA-32 Linux with gcc 4.3.2
=begin
I reported this on ruby-core last week ([ruby-core:20850] Re: Problems compiling R20933 on Ubuntu 8.10 Linux), expecting a quick reply & fix, but nothing appears to have been done. Here is an extract from it:

> FYI
>
> ...
mike (Michael Selig)

12/20/2008

05:54 AM Ruby Feature #908 (Rejected): Should be an easy way of reading N characters from am I/O stream
=begin
I know of no way of reading N characters (as opposed to bytes) and returning a string other than writing a loop with getc or each_char.

Suggestions - one of:

1) Change the "limit" paramater on IO#gets to mean character...
mike (Michael Selig)

10/29/2008

01:28 PM Ruby Feature #695: More flexibility when combining ASCII-8BIT strings with other encodings
=begin
Sorry, I meant Array#pack, not String#pack of course.

Mike.
=end
mike (Michael Selig)
12:53 PM Ruby Feature #695 (Closed): More flexibility when combining ASCII-8BIT strings with other encodings
=begin
Consider the following 3 Ruby statements:

# String#pack always returns ASCII-8BIT
s1 = [97, 98, 99, 1589].pack("U*")

# \xNN returns the source encoding (even if it is an invalid string), or ASCII-8BIT if not set
s2 ...
mike (Michael Selig)

10/12/2008

08:25 AM Ruby Feature #640 (Rejected): New Array#encoding_pack -> string method
=begin
Now that we have String#each_codepoint there are times when you want to pack an array of integer codepoints back to a string. With UTF-8 you can use:
arr.pack("U*").force_encoding("UTF-8")
But I think it would be better to ...
mike (Michael Selig)

Also available in: Atom