# Ruby.h (et al.) documentation for D bindings

**URL:** <https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139>\
**Category:** Ruby\
**Created:** [May 4, 2009, 4:21pm UTC](https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139 "2009-05-04T16:21:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@Tomash](https://www.ruby-forum.com/u/Tomash)\
**Post date:** [May 4, 2009, 4:21pm UTC](https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139/1 "2009-05-04T16:21:10Z")

</div>

Hi,

I’m writing a library for developing Ruby native extensions in D  
language

> **[GitHub - tomash/rudy: enable and ease writing Ruby native extensions in D...](https://github.com/tomash/rudy/tree/master)**
>
> master

One of the most important parts of it is a set of bindings – ruby.d  
converted from ruby.h via a special program for that (D language  
cannot read C .h files). As for now I’ve been OK with (sparse)  
documentation in README.EXT and pickaxe book, with occassional  
googling thrown in. But I’m in bigger and bigger need for a decent  
Ruby API .h reference, with explanations on what do functions do (for  
instance, what’s the difference between rb\_str\_new, rb\_str\_new2 and  
rb\_str\_new3) – their names are sometimes not enough.

I know about Doxygen, but it’s just listing methods and references,  
not giving a lot of helpful explanation. So, could you point me to  
some resource documenting Ruby’s C API with all its subtleties?

Question as for now: I have a C float/double variable, I want to  
convert it to Ruby’s Float. Only function I’ve found is rb\_dbl2big and  
I’d love to convert to Float, not BigNum. It’s documentation and  
implementation on Doxygen is quite cryptic, to be honest.

Thanks in advance!  
Tomek “Tomash” Stachewicz

---

<div class="post-metadata">

**Author:** ![Tomash](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@Tomash](https://www.ruby-forum.com/u/Tomash)\
**Post date:** [May 4, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/ruby-h-et-al-documentation-for-d-bindings/167139/2 "2009-05-04T16:35:55Z")

</div>

OK, I’ve found rb\_float\_new – so my last question is irrelevant.  
Corelib.rubyonrails with “view source” for the win!

Question about good API reference still prevails though 🙂
