File: hello.rb

package info (click to toggle)
libinline-ruby 3.6.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 156 kB
  • ctags: 130
  • sloc: ruby: 1,197; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 237 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/local/bin/ruby -w

begin require 'rubygems' rescue LoadError end
require 'inline'

class Hello
  inline do |builder|
    builder.include "<stdio.h>"
    builder.c 'void hello() { puts("hello world"); }'
  end
end

Hello.new.hello