开发者

What are the relationship\dependencies between C++ and Ruby?

I am using Ruby on Rails 3 and I would to understant what means when I read "Convert Ruby to low level languages?"-

That means that I can use C\C++ code\logic directly in a Ruby开发者_JAVA技巧 application?


Core parts of some implementations of Ruby (excluding rbx/jruby) and some RubyGems are implemented in C. It is possible to write libraries in C that – when compiled - can be used within a Ruby script, provided they conform to certain specifications:

http://www.ruby-doc.org/doxygen/current/

As for using C code or logic directly in a Ruby application – no, this is not possible. It needs to be encapsulated in a library that conforms to the specifications and then compiled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜