Skip to content
This repository was archived by the owner on Dec 29, 2018. It is now read-only.

Commit df925c4

Browse files
author
Nick Markwell
committed
Add sirb.
1 parent b91d973 commit df925c4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

bin/sirb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env ruby
2+
3+
begin
4+
require 'sicuro'
5+
rescue LoadError
6+
require 'rubygems'
7+
require 'sicuro'
8+
end
9+
10+
require 'ripl'
11+
12+
if ['--help', '-h'].include?(ARGV[0])
13+
puts "Usage: #{$0}"
14+
puts "Sicuro + irb."
15+
# TODO: Better --help
16+
else
17+
ripl_gem_root = Gem.loaded_specs['ripl'].full_gem_path
18+
ripl_lib_dir = File.join(ripl_gem_root, 'lib')
19+
20+
Sicuro.new(0, 0).eval('
21+
$stdin.rewind
22+
23+
require "ripl"
24+
25+
Ripl.start
26+
', $stdin, $stdout, $stderr, [ripl_lib_dir])
27+
end
28+

0 commit comments

Comments
 (0)