Patches: Browse | Submit New | Admin

[#25318] Ruby 1.9 and Rspec 1.2.2 support patch

Date:
2009-04-09 04:59
Priority:
3
Submitted By:
Sergey Yanovitsky (jah)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Ruby 1.9 and Rspec 1.2.2 support patch

Detailed description
Last night together with my colleague Alexey Chebotar (http://rubyforge.org/users/alexey_chebotar) we made a patch to
rbus that is attached below.

This patch enables ruby 1.9 compatibility (1.8 works too) as well as updated specs that could be run on RSpec 1.2.2. 

rake spec is now passing all tests.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-09-27 15:04
Sender: Kristoffer Lundén

Hello, and thanks for the contribution.

However, I don't feel I have the knowledge or time with this
project to fix patches and the like - I would therefore be happy
to let others take over the project if they want to.

If you would like to be an admin for this project, please let
me know and I will make it so. It would be sad to see it die
just because I have moved on...

Thanks!
Date: 2009-07-07 16:20
Sender: Anton Maminov

it's code works fine with ruby 1.8, but with 1.9 i have error

require 'rbus'
Thread.abort_on_exception=true
session_bus = RBus.session_bus
amarok_player = session_bus.get_object('org.kde.amarok',
'/Player')
amarok_player.interface!('org.freedesktop.MediaPlayer')
amarok_player.connect!('StatusChange'){|uri|
  metadata = amarok_player.GetMetadata
  puts "#{metadata['artist']} - #{metadata['title']}"
}
RBus.mainloop

/usr/local/lib/site_ruby/1.9.0/rbus/message/marshal.rb:137:in
`dbus_marshal': undefined method `each' for
"path='/Player',member='StatusChange'":String
(NoMethodError)

String is not Enumerable anymore. Use #each_line instead
of #each.
When change, rbus doesn't wanna work properly. But work without
errors.
Date: 2009-04-09 05:08
Sender: Alexey Chebotar

This patch solve bug #25226 :)

Attached Files:

Name Description Download
ruby-1.9_rspec-1.2.2_support.diff Ruby 1.9 and Rspec 1.2.2 support patch Download

Changes:

Field Old Value Date By
File Added4487: ruby-1.9_rspec-1.2.2_support.diff2009-04-09 04:59jah