# Does ruby.h overrides C "enum"?

**URL:** <https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771>\
**Category:** ruby-talk\
**Created:** [12 October 2009 13:02 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771 "2009-10-12T13:02:16Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 13:02 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/1 "2009-10-12T13:02:16Z")

</div>

Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using  
"enum":

&nbsp;&nbsp;#include "ruby.h"  
&nbsp;&nbsp;int void(void) {  
&nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
&nbsp;&nbsp;}

line 3: error: expected identifier before ‘(’ token

It doesn't occur if I quit "ruby.h". What is happening?

Thanks.

> **···**
>
> --  
> Iñaki Baz Castillo \<[ibc@aliax.net](mailto:ibc@aliax.net)\>

---

<div class="post-metadata">

**Author:** ![Tim\_Hunter1](https://avatars.discourse-cdn.com/v4/letter/t/3ec8ea/32.png) [@Tim\_Hunter1](https://rubytalk.org/u/Tim_Hunter1)\
**Post date:** [12 October 2009 13:13 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/2 "2009-10-12T13:13:34Z")

</div>

Iñaki Baz Castillo wrote:

> Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when  
> using  
> "enum":
> 
> &nbsp;&nbsp;#include "ruby.h"  
> &nbsp;&nbsp;int void(void) {  
> &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> &nbsp;&nbsp;}
> 
> line 3: error: expected identifier before ‘(’ token
> 
> It doesn't occur if I quit "ruby.h". What is happening?
> 
> Thanks.

I think the compiler is complaining about your attempt to use "void" as  
a function name. "void" is a reserved word in C.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![7stud](https://avatars.discourse-cdn.com/v4/letter/7/57b2e6/32.png) [@7stud](https://rubytalk.org/u/7stud)\
**Post date:** [12 October 2009 13:29 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/3 "2009-10-12T13:29:07Z")

</div>

Iñaki Baz Castillo wrote:

> Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when  
> using  
> "enum":
> 
> &nbsp;&nbsp;#include "ruby.h"  
> &nbsp;&nbsp;int void(void) {  
> &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> &nbsp;&nbsp;}
> 
> line 3: error: expected identifier before ‘(’ token
> 
> It doesn't occur if I quit "ruby.h". What is happening?

What does "quit ruby.h mean"? What compiler are you using?

test.c :

> **···**
>
> -----  
> int void(void) {  
> &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> }
> 
> --output:--  
> $ g++ test.c -o test  
> test.c:1: error: expected unqualified-id before ‘void’  
> test.c:1: error: expected `)' before ‘void’
> 
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 14:17 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/4 "2009-10-12T14:17:08Z")

</div>

opss, the same error occurs if I add "#include \<stdio.h\>".

> **···**
>
> El Lunes, 12 de Octubre de 2009, Iñaki Baz Castillo escribió:
> 
> > Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using  
> > "enum":
> > 
> > &nbsp;&nbsp;#include "ruby.h"  
> > &nbsp;&nbsp;int void(void) {  
> > &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> > &nbsp;&nbsp;}
> > 
> > line 3: error: expected identifier before ‘(’ token
> > 
> > It doesn't occur if I quit "ruby.h". What is happening?
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 13:37 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/5 "2009-10-12T13:37:36Z")

</div>

No no, that's a typo of mie when composing the mail.  
Imagine it's "int main(void)".

> **···**
>
> El Lunes, 12 de Octubre de 2009, Tim Hunter escribió:
> 
> > Iñaki Baz Castillo wrote:  
> > \> Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when  
> > \> using  
> > \> "enum":  
> > \>  
> > \> #include "ruby.h"  
> > \> int void(void) {  
> > \> enum kk {ONE, TWO, THREE}; // line 3  
> > \> }  
> > \>  
> > \> line 3: error: expected identifier before ‘(’ token  
> > \>  
> > \>  
> > \> It doesn't occur if I quit "ruby.h". What is happening?  
> > \>  
> > \> Thanks.
> > 
> > I think the compiler is complaining about your attempt to use "void" as  
> > a function name. "void" is a reserved word in C.
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 13:39 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/6 "2009-10-12T13:39:58Z")

</div>

> Iñaki Baz Castillo wrote:  
> \> Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when  
> \> using  
> \> "enum":  
> \>  
> \> #include "ruby.h"  
> \> int void(void) {  
> \> enum kk {ONE, TWO, THREE}; // line 3  
> \> }  
> \>  
> \> line 3: error: expected identifier before ‘(’ token  
> \>  
> \>  
> \> It doesn't occur if I quit "ruby.h". What is happening?
> 
> What does "quit ruby.h mean"?

I just mean that the above code (note that it should be "int main(void)")  
without '#include "ruby.h"' line compiles ok.

> What compiler are you using?

gcc 4.3 under Debian Lenny 64 bits.

> test.c :  
> -----  
> int void(void) {  
> &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> }
> 
> --output:--  
> $ g++ test.c -o test  
> test.c:1: error: expected unqualified-id before ‘void’

Yes, a typo of my mail. Please use "int main(void)" instead.

> **···**
>
> El Lunes, 12 de Octubre de 2009, 7stud -- escribió:
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![angico](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@angico](https://rubytalk.org/u/angico)\
**Post date:** [12 October 2009 14:35 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/7 "2009-10-12T14:35:33Z")

</div>

Hi,

> **···**
>
> ------  
> On Monday 12 October 2009 11:17:08 Iñaki Baz Castillo wrote:
> 
> > El Lunes, 12 de Octubre de 2009, Iñaki Baz Castillo escribió:  
> > \> Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when  
> > \> using "enum":  
> > \>  
> > \> #include "ruby.h"  
> > \> int void(void) {  
> > \> enum kk {ONE, TWO, THREE}; // line 3  
> > \> }  
> > \>  
> > \> line 3: error: expected identifier before ‘(’ token  
> > \>  
> > \>  
> > \> It doesn't occur if I quit "ruby.h". What is happening?
> > 
> > opss, the same error occurs if I add "#include \<stdio.h\>".
> 
> Are you sure the typo was only in the mail? If I copy and paste this code in a  
> file and try to compile it, the compiler complains about the same error,  
> because void is a reserved keyword in C. But when I change that "void(void)"  
> into "main(void)" it compiles ok.
> 
> --  
> angico  
> ------
> 
> Site: angico.org  
> Blog: angico.org/blog
> 
> Gnu/Linux, FLOSS, Espiritismo, e eu por mim mesmo 8^I
> 
> == Cooperação é \_muito\_ melhor que competição ==
> 
> ------  
> contatos:  
> email: angico@angico.org  
> skype: angico00

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 14:52 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/8 "2009-10-12T14:52:48Z")

</div>

ok, let's try it:

file\_a.c

> **···**
>
> El Lunes, 12 de Octubre de 2009, angico escribió:
> 
> > Are you sure the typo was only in the mail? If I copy and paste this code  
> > in a file and try to compile it, the compiler complains about the same  
> > error, because void is a reserved keyword in C. But when I change that  
> > "void(void)" into "main(void)" it compiles ok.
> 
> ----------------  
> &nbsp;&nbsp;int main(void) {  
> &nbsp;&nbsp;enum kk {NULL=0, NS=1, URL=2};  
> &nbsp;&nbsp;}  
> ----------------
> 
> It compiles ok.
> 
> Now:
> 
> file\_b.c  
> ----------------  
> &nbsp;&nbsp;#include \<stdio.h\>  
> &nbsp;&nbsp;int main(void) {  
> &nbsp;&nbsp;enum kk {NULL=0, NS=1, URL=2};  
> &nbsp;&nbsp;}  
> ----------------
> 
> $ gcc file\_b.c  
> file\_b.c: In function ‘main’:  
> file\_b.c:3: error: expected identifier before ‘(’ token
> 
> ¿?¿?
> 
> PS: It seems to be a problem not related to Ruby.
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![7stud](https://avatars.discourse-cdn.com/v4/letter/7/57b2e6/32.png) [@7stud](https://rubytalk.org/u/7stud)\
**Post date:** [12 October 2009 17:29 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/9 "2009-10-12T17:29:32Z")

</div>

Iñaki Baz Castillo wrote:

> **···**
>
> > El Lunes, 12 de Octubre de 2009, 7stud -- escribió:
> > 
> > > \> line 3: error: expected identifier before ‘(’ token  
> > > \>  
> > > \>  
> > > \> It doesn't occur if I quit "ruby.h". What is happening?
> > > 
> > > What does "quit ruby.h mean"?
> > 
> > I just mean that the above code (note that it should be "int  
> > main(void)")  
> > without '#include "ruby.h"' line compiles ok.
> > 
> > > What compiler are you using?
> > 
> > gcc 4.3 under Debian Lenny 64 bits.
> > 
> > > test.c :  
> > > -----  
> > > int void(void) {  
> > > &nbsp;&nbsp;&nbsp;&nbsp;enum kk {ONE, TWO, THREE}; // line 3  
> > > }
> > > 
> > > --output:--  
> > > $ g++ test.c -o test  
> > > test.c:1: error: expected unqualified-id before ‘void’
> > 
> > Yes, a typo of my mail. Please use "int main(void)" instead.
> 
> Maybe next time you should consider posting the code that actually  
> produced the error message. Debugging fake programs never works very  
> well.  
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Rob\_Biedenharn1](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@Rob\_Biedenharn1](https://rubytalk.org/u/Rob_Biedenharn1)\
**Post date:** [12 October 2009 15:23 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/10 "2009-10-12T15:23:24Z")

</div>

I think you'll find your problem is due to a macro for NULL.  
Change your code from "NULL" to "kNULL":

&nbsp;&nbsp;#include \<stdio.h\>  
&nbsp;&nbsp;int main(void) {  
&nbsp;&nbsp;enum kk {kNULL=0, NS=1, URL=2};  
&nbsp;&nbsp;}

and your problem goes away.

-Rob

> **···**
>
> On Oct 12, 2009, at 10:52 AM, Iñaki Baz Castillo wrote:
> 
> > El Lunes, 12 de Octubre de 2009, angico escribió:
> > 
> > > Are you sure the typo was only in the mail? If I copy and paste this code  
> > > in a file and try to compile it, the compiler complains about the same  
> > > error, because void is a reserved keyword in C. But when I change that  
> > > "void(void)" into "main(void)" it compiles ok.
> > 
> > ok, let's try it:
> > 
> > file\_a.c  
> > ----------------  
> > int main(void) {  
> > &nbsp;&nbsp;enum kk {NULL=0, NS=1, URL=2};  
> > }  
> > ----------------
> > 
> > It compiles ok.
> > 
> > Now:
> > 
> > file\_b.c  
> > ----------------  
> > #include \<stdio.h\>  
> > int main(void) {  
> > &nbsp;&nbsp;enum kk {NULL=0, NS=1, URL=2};  
> > }  
> > ----------------
> > 
> > $ gcc file\_b.c  
> > file\_b.c: In function ‘main’:  
> > file\_b.c:3: error: expected identifier before ‘(’ token
> > 
> > ¿?¿?
> > 
> > PS: It seems to be a problem not related to Ruby.
> > 
> > --  
> > Iñaki Baz Castillo \<ibc@aliax.net\>
> 
> Rob Biedenharn [http://agileconsultingllc.com](http://agileconsultingllc.com)  
> Rob@AgileConsultingLLC.com

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 17:37 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/11 "2009-10-12T17:37:53Z")

</div>

Right, I'm sorry. I never spected that the usage of "NULL" was creating the  
issue.

Thanks a lot.

> **···**
>
> El Lunes, 12 de Octubre de 2009, 7stud -- escribió:
> 
> > Maybe next time you should consider posting the code that actually  
> > produced the error message. Debugging fake programs never works very  
> > well.
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![Seebs1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Seebs1](https://rubytalk.org/u/Seebs1)\
**Post date:** [12 October 2009 17:50 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/12 "2009-10-12T17:50:25Z")

</div>

> ----------------  
> &nbsp;&nbsp;#include \<stdio.h\>  
> &nbsp;&nbsp;int main(void) {  
> &nbsp;&nbsp;enum kk {NULL=0, NS=1, URL=2};  
> &nbsp;&nbsp;}

NULL is a symbol defined by the implementation, and defined by several of  
the standard headers (including \<stdio.h\>).

Usually, it is either "0" or "(void \*) 0" or something equivalent.

> $ gcc file\_b.c  
> file\_b.c: In function ?main?:  
> file\_b.c:3: error: expected identifier before ?(? token

I'd bet you've got one where it's "(void \*) 0".

-s

> **···**
>
> On 2009-10-12, Iñaki Baz Castillo \<ibc@aliax.net\> wrote:  
> --  
> Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net  
> [| Seebs.Net](http://www.seebs.net/log/) \<-- lawsuits, religion, and funny pictures  
> [Fair game (Scientology) - Wikipedia](http://en.wikipedia.org/wiki/Fair_Game_(Scientology)) \<-- get educated!

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 15:35 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/13 "2009-10-12T15:35:34Z")

</div>

opss, great!

Thanks a lot.

> **···**
>
> El Lunes, 12 de Octubre de 2009, Rob Biedenharn escribió:
> 
> > I think you'll find your problem is due to a macro for NULL.  
> > Change your code from "NULL" to "kNULL":
> > 
> > &nbsp;&nbsp;#include \<stdio.h\>  
> > &nbsp;&nbsp;int main(void) {  
> > &nbsp;&nbsp;enum kk {kNULL=0, NS=1, URL=2};  
> > &nbsp;&nbsp;}
> > 
> > and your problem goes away.
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![angico](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@angico](https://rubytalk.org/u/angico)\
**Post date:** [12 October 2009 15:43 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/14 "2009-10-12T15:43:29Z")

</div>



---

<div class="post-metadata">

**Author:** ![Seebs1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Seebs1](https://rubytalk.org/u/Seebs1)\
**Post date:** [12 October 2009 18:25 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/15 "2009-10-12T18:25:05Z")

</div>

The secret to effective debugging:

If you suspected what it was, you wouldn't need to ask for help. So it  
is usually best to try to include a tested reproducer rather than guessing  
at which parts are relevant.

This is something that takes people a few tries to get, usually.

-s

> **···**
>
> On 2009-10-12, Iñaki Baz Castillo \<ibc@aliax.net\> wrote:
> 
> > Right, I'm sorry. I never spected that the usage of "NULL" was creating the  
> > issue.
> 
> --  
> Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net  
> [| Seebs.Net](http://www.seebs.net/log/) \<-- lawsuits, religion, and funny pictures  
> [Fair game (Scientology) - Wikipedia](http://en.wikipedia.org/wiki/Fair_Game_(Scientology)) \<-- get educated!

---

<div class="post-metadata">

**Author:** ![Paul\_Smith1](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@Paul\_Smith1](https://rubytalk.org/u/Paul_Smith1)\
**Post date:** [12 October 2009 19:20 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/16 "2009-10-12T19:20:06Z")

</div>

At least, mocking up an example is fine, but check that the mocked up  
example demonstrates the same failure. In this case, your mocked up  
example did not, and having seen that, you would likely have solved  
the problem yourself 🙂

> **···**
>
> On Mon, Oct 12, 2009 at 7:25 PM, Seebs \<usenet-nospam@seebs.net\> wrote:
> 
> > On 2009-10-12, Iñaki Baz Castillo \<ibc@aliax.net\> wrote:
> > 
> > > Right, I'm sorry. I never spected that the usage of "NULL" was creating the  
> > > issue.
> > 
> > The secret to effective debugging:
> > 
> > If you suspected what it was, you wouldn't need to ask for help. So it  
> > is usually best to try to include a tested reproducer rather than guessing  
> > at which parts are relevant.
> 
> --  
> Paul Smith  
> [http://www.nomadicfun.co.uk](http://www.nomadicfun.co.uk)
> 
> paul@pollyandpaul.co.uk

---

<div class="post-metadata">

**Author:** ![Seebs1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Seebs1](https://rubytalk.org/u/Seebs1)\
**Post date:** [12 October 2009 19:30 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/17 "2009-10-12T19:30:07Z")

</div>

Yes. And be sure the mockup is actually representing the problem as such...

My favorite example of recent memory: Someone reported a bug, which  
was that the compiler was generating an instruction not supported by a  
particular CPU. The submitted reproducer, to simplify things, simply  
included the unwanted instruction in inline assembly... It took some  
prodding to discover that there was an actual, underlying, problem.

-s

> **···**
>
> On 2009-10-12, Paul Smith \<paul@pollyandpaul.co.uk\> wrote:
> 
> > At least, mocking up an example is fine, but check that the mocked up  
> > example demonstrates the same failure. In this case, your mocked up  
> > example did not, and having seen that, you would likely have solved  
> > the problem yourself 🙂
> 
> --  
> Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net  
> [| Seebs.Net](http://www.seebs.net/log/) \<-- lawsuits, religion, and funny pictures  
> [Fair game (Scientology) - Wikipedia](http://en.wikipedia.org/wiki/Fair_Game_(Scientology)) \<-- get educated!

---

<div class="post-metadata">

**Author:** ![Inaki\_Baz\_Castillo](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Inaki\_Baz\_Castillo](https://rubytalk.org/u/Inaki_Baz_Castillo)\
**Post date:** [12 October 2009 19:53 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/18 "2009-10-12T19:53:49Z")

</div>

100% agree. I'm really sorry the waste of time.

Thanks a lot.

> **···**
>
> El Lunes, 12 de Octubre de 2009, Paul Smith escribió:
> 
> > On Mon, Oct 12, 2009 at 7:25 PM, Seebs \<usenet-nospam@seebs.net\> wrote:  
> > \> On 2009-10-12, Iñaki Baz Castillo \<ibc@aliax.net\> wrote:  
> > \>\> Right, I'm sorry. I never spected that the usage of "NULL" was creating  
> > \>\> the issue.  
> > \>  
> > \> The secret to effective debugging:  
> > \>  
> > \> If you suspected what it was, you wouldn't need to ask for help. So it  
> > \> is usually best to try to include a tested reproducer rather than  
> > \> guessing at which parts are relevant.
> > 
> > At least, mocking up an example is fine, but check that the mocked up  
> > example demonstrates the same failure. In this case, your mocked up  
> > example did not, and having seen that, you would likely have solved  
> > the problem yourself 🙂
> 
> --  
> Iñaki Baz Castillo \<ibc@aliax.net\>

---

<div class="post-metadata">

**Author:** ![Seebs1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Seebs1](https://rubytalk.org/u/Seebs1)\
**Post date:** [12 October 2009 21:40 UTC](https://rubytalk.org/t/does-ruby-h-overrides-c-enum/55771/19 "2009-10-12T21:40:06Z")

</div>

Don't sweat it. You learned something.

I don't participate in Usenet because I want the answers I give to the  
specific questions people asked to be the most efficient possible use of  
anyone's time; I participate in Usenet because I want to learn things and  
help other people learn things.

If you learned something about debugging, and something about asking  
questions, that's great. It doesn't have to always be exactly the thing  
you thought you were going to learn...

-s

> **···**
>
> On 2009-10-12, Iñaki Baz Castillo \<ibc@aliax.net\> wrote:
> 
> > 100% agree. I'm really sorry the waste of time.
> 
> --  
> Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net  
> [| Seebs.Net](http://www.seebs.net/log/) \<-- lawsuits, religion, and funny pictures  
> [Fair game (Scientology) - Wikipedia](http://en.wikipedia.org/wiki/Fair_Game_(Scientology)) \<-- get educated!
