Forum: Ruby-Gnome 2 [ANN] Ruby-GNOME2 1.0.2

Posted by Kouhei Sutou (Guest)
on 2011-09-18 15:25
(Received via mailing list)
Hi,

The Ruby-GNOME2 project released Ruby-GNOME2 1.0.2:
  http://ruby-gnome2.sourceforge.jp/?News_20110918_2

I'm sorry for the quick next release. :<
This is a bug fix release of 1.0.1.
1.0.1 can't be installed with RubyGems 1.8.3.
And 1.0.1 isn't set the default theme on Windows.

=== Install

  % gem install gtk2

=== Changes

==== Ruby/GLib2

  * Fixes
    * [#3411204] Supported RubyGems 1.8.3.
      [Tobias Pfeiffer, Kouhei Sutou]

==== Ruby/GTK2

  * Fixes
    * Fixed the default theme on Windows.
      [ashbb, Kouhei Sutou]

=== Thanks

  * Tobias Pfeiffer
  * ashbb

Thanks,
--
kou
Posted by Simon Arnaud (sarnaud)
on 2011-09-18 19:18
Kouhei Sutou wrote in post #1022545:
> Hi,
>
> The Ruby-GNOME2 project released Ruby-GNOME2 1.0.2:
>   http://ruby-gnome2.sourceforge.jp/?News_20110918_2
>
> I'm sorry for the quick next release. :<
> This is a bug fix release of 1.0.1.
> 1.0.1 can't be installed with RubyGems 1.8.3.
> And 1.0.1 isn't set the default theme on Windows.
>
> ==== Ruby/GLib2
>
>   * Fixes
>     * [#3411204] Supported RubyGems 1.8.3.
>       [Tobias Pfeiffer, Kouhei Sutou]
>

There is an error remaining, in <glib2>/lib/mkmf-gnome2.rb, line 388 :

cairo_gem_spec = (Gem::Specification.respond_to?(:find_by_name) ?
                  Gem::Specification.find_by_name('cairo') :
                  Gem.source_index.find_name('cairo')).last

Gem::Specification.find_by_name always return one gem spec, not an 
array.

We either need to use 'last' only on Gem.source_index, or to to use 
Gem::Specification.find_all_by_name.
Posted by Nikolai Weibull (Guest)
on 2011-09-18 23:29
(Received via mailing list)
On Sun, Sep 18, 2011 at 19:18, Simon Arnaud
<ruby-forum-incoming@andreas-s.net> wrote:
> Kouhei Sutou wrote in post #1022545:

>>     * [#3411204] Supported RubyGems 1.8.3.
>>       [Tobias Pfeiffer, Kouhei Sutou]

> There is an error remaining, in <glib2>/lib/mkmf-gnome2.rb, line 388 :
>
> cairo_gem_spec = (Gem::Specification.respond_to?(:find_by_name) ?
>                  Gem::Specification.find_by_name('cairo') :
>                  Gem.source_index.find_name('cairo')).last
>
> Gem::Specification.find_by_name always return one gem spec, not an
> array.

Sorry.  These errors were my fault.  I should have refactored while I
was at it (and actually checked what #find_by_name returned).  For
some reason the code worked for me, so I don’t understand how it
slipped by (I guess my version of RubyGems only warned about
#find_name being deprecated, but didn’t actually support
#find_by_name, which seems weird).
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.