Patches: Browse | Submit New | Admin

[#9923] "`private_class_method': undefined method `create' for class `Class' (NameError)" patch

Date:
2007-04-07 09:19
Priority:
3
Submitted By:
Mikko Peltonen (mpeltonen)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
"`private_class_method': undefined method `create' for class `Class' (NameError)" patch

Detailed description
With rubygems installed, you may get the following error message (at least on WinXP) when using serialport extension:

(eval):1: (eval):1:in `private_class_method': undefined method `create' for class `Class' (NameError)
        from (eval):1
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'

I managed to fix this by moving the ruby part of the extension into separate ruby file from the c source (rb_eval_string()
call).

Attached is a patched distribution, which has additional lib/serialport.rb ruby file including the ruby part (moved
from the c-source). It is installed automatically with "make install", and when using the extension you shoud
use "require 'serialport'" instead of serialport.so.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
ruby-serialport-0.6.patch.zip Download

Changes:

Field Old Value Date By
File Added1799: ruby-serialport-0.6.patch.zip2007-04-07 09:19mpeltonen