Sha256: 4c69b62f487ed485ed9e5126e6fc0ff17d20b30fe031ef45c9e230f5af26d6f8

Contents?: true

Size: 781 Bytes

Versions: 14

Compression:

Stored size: 781 Bytes

Contents

== Using Ruby in Lua

==NONE OF THIS IS IMPLEMENTED

==IF YOU HAVE SUGGESTIONS, TELL ME!

Ruby is different in Lua in that there is a single Ruby VM, whereas there can be
many Lua states.  This is represented in Lua as an object in the global table named 'ruby'.

The first thing you need to require the RubyLuaBridge library.  With this object, you can
run Ruby code, load Ruby libraries, and access Ruby objects.

   require 'rubyluabridge'
   print(ruby)    # => userdata: 0x219083

With this +ruby+ object, you can get and set variables and invoke functions.

   ruby.NilClass    --
   ruby.a = 5       -- 
   ruby.print       --

   ruby.eval("print 'hello world'"     # => nil
   ruby.eval("1")                      # => 1
   ruby.eval("'test'")                 # => "test"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
Tamar-0.7.18 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.17 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.16 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.14 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.13 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.12 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.11 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.10 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.9 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.8 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.7 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.6 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.5 src/rubyluabridge/RUBY_IN_LUA
Tamar-0.7.4 src/rubyluabridge/RUBY_IN_LUA