# Help for upgrading my sources from ruby 1.6.8 to 1.8.x

**URL:** <https://www.ruby-forum.com/t/help-for-upgrading-my-sources-from-ruby-1-6-8-to-1-8-x/52815>\
**Category:** Ruby\
**Created:** [January 19, 2006, 12:34pm UTC](https://www.ruby-forum.com/t/help-for-upgrading-my-sources-from-ruby-1-6-8-to-1-8-x/52815 "2006-01-19T12:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Burkhard\_Boerner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9c0ed/32.png) [@Burkhard\_Boerner](https://www.ruby-forum.com/u/Burkhard_Boerner)\
**Post date:** [January 19, 2006, 12:34pm UTC](https://www.ruby-forum.com/t/help-for-upgrading-my-sources-from-ruby-1-6-8-to-1-8-x/52815/1 "2006-01-19T12:34:21Z")

</div>

Hello,

1. question:  
in 1.6.8 the line

rb\_protect(rb\_thread\_stop, self, &iRes);

is working well, in 1.8.2 it produces an compile error.

Looking into “intern.h” shows a difference between both versions  
1.6.8:  
VALUE rb\_protect \_((VALUE (_)(), VALUE, int_));  
VALUE rb\_thread\_stop \_((void));

1.8.2:  
VALUE rb\_protect \_((VALUE (_)(VALUE), VALUE, int_));  
VALUE rb\_thread\_stop \_((void));

Is this a bug or is it not longer allowed to give rb\_thread\_stop as  
first parameter?

1. question:  
Because we are developing for railway organizations, we have a  
track-element called “Signal”. Therefore we have also created a  
corresponding class Signal (using it a long time and in many  
applications). This is in conflict with ruby 1.8.  
Do we have any chance to omit the change of the class name to be  
compliant with 1.8?

With kind regards

Burkhard Boerner

---

<div class="post-metadata">

**Author:** ![Burkhard\_Boerner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9c0ed/32.png) [@Burkhard\_Boerner](https://www.ruby-forum.com/u/Burkhard_Boerner)\
**Post date:** [January 19, 2006, 4:20pm UTC](https://www.ruby-forum.com/t/help-for-upgrading-my-sources-from-ruby-1-6-8-to-1-8-x/52815/2 "2006-01-19T16:20:44Z")

</div>

Hi,

At Thu, 19 Jan 2006 19:55:49 +0900,  
Burkhard Boerner wrote in [ruby-talk:176150]:

> 1. question:  
> in 1.6.8 the line
> 
> rb\_protect(rb\_thread\_stop, self, &iRes);
> 
> is working well, in 1.8.2 it produces an compile error.

It should be a warning in C.

> first parameter?  
> You just need a cast.

> 1. question:  
> Because we are developing for railway organizations, we have a  
> track-element called “Signal”. Therefore we have also created a  
> corresponding class Signal (using it a long time and in many  
> applications). This is in conflict with ruby 1.8.  
> Do we have any chance to omit the change of the class name to be  
> compliant with 1.8?

module Railway  
class Signal  
end  
end

---

<div class="post-metadata">

**Author:** ![Burkhard\_Boerner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e9c0ed/32.png) [@Burkhard\_Boerner](https://www.ruby-forum.com/u/Burkhard_Boerner)\
**Post date:** [January 19, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/help-for-upgrading-my-sources-from-ruby-1-6-8-to-1-8-x/52815/3 "2006-01-19T19:28:06Z")

</div>

removed\_email\_address@domain.invalid wrote:

> end  
> end

But code using

Signal::SomeConstant

will have to be changed to

Railway::Signal::SomeConstant

module Railway  
class Signal  
SomeConstant = “FOO”  
end  
end

p Railway::Signal::SomeConstant # prints “FOO”

include Railway

p Signal::SomeConstant

# raises a name error NameError: uninitialized constant

# Signal::SomeConstant

One can do

module Signal  
SomeConstant = Railway::Signal::SomeConstant  
end
