Subject: [sup-devel] console gem 0.3

From: William Morgan <[email-masked]>
Date: Tue, 18 Jan 2011 15:05:58 -0500

Hi guys,

I've finally released a new version of the console gem which supports
Ruby 1.8. This will be useful in Sup to a) replace String#display_length
(which is a totally wrong hack right now), and b) replace the dl/import
set_locale madness in bin/sup.

So basically this should remove some code and should improve i18n
support for CJK users.

Before I work on a patch, I'm curious if those of you on funny operating
systems (e.g. Cygwin, BSD, Darwin) are able to install this gem
successfully.

If you are a non-i386 Linux user, please try `gem install console` and
report the result (success/failure) along with your OS version and your
ruby version.

For extra credit, here's a test script you can run and make sure the
output is a 30-column block of text:

  ## encoding: UTF-8 (this comment required for ruby 1.9)
  require 'rubygems' # this line required for ruby 1.8
  require 'console'
  require 'console/string'

  Console.init_locale!

  STRING = "我能吞下玻璃而不傷身體。Góa ē-tàng chia̍h po-lê, mā bē tio̍h-siong.私はガラスを食べられます。それは私を傷つけません。I can eat glass and it doesn't hurt me."
  COLS = 30

  rows = STRING.display_width / COLS
  (0 .. rows).each { |i| puts STRING.display_slice(i * COLS, COLS) }

Thanks!
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Hamish D <[email-masked]>
Date: Tue, 18 Jan 2011 22:30:33 +0000

No problems here - Linux on x86_64, Ubuntu 10.10,

> report the result (success/failure) along with your OS version and your

$ ruby --version
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]

$ sudo gem install console
[sudo] password for mish:
Building native extensions.  This could take a while...
Successfully installed console-0.3
1 gem installed
Installing ri documentation for console-0.3...
Installing RDoc documentation for console-0.3...

> output is a 30-column block of text:

$ ruby console-test.rb
我能吞下玻璃而不傷身體。Góa ē-
tàng chia̍h po-lê, mā bē tio̍h-s
iong.私はガラスを食べられます
 それは私を傷つけません。I can
 eat glass and it doesn't hurt
 me.

Hamish Downer

---

From: Sascha Silbe <[email-masked]>
Date: Tue, 18 Jan 2011 22:20:45 +0100

> report the result (success/failure) along with your OS version and your

Builds fine on an OpenRD (armel) running Debian Squeeze / Linux 2.6.34:

sascha.silbe@flatty:~$ sudo gem install console
sascha.silbe@flatty:~$ 

> output is a 30-column block of text:

I can't spot any obvious failure:

我能吞下玻璃而不傷身體。Góa ē-

I can test on amd64, too, but expect somebody else to have already done
so.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel