Skip to content

Commit f753d31

Browse files
committed
Add core constants/gvars to corelib/variables.rb
1 parent 72cf7f1 commit f753d31

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

opal/corelib/variables.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# regexp matches
2+
$& = $~ = $` = $' = nil
3+
4+
# stub library path
5+
$: = []
6+
$" = []
7+
8+
# split lines
9+
$/ = "\n"
10+
$, = nil
11+
12+
ARGV = []
13+
ARGF = Object.new
14+
ENV = {}
15+
16+
$VERBOSE = false
17+
$DEBUG = false
18+
$SAFE = 0
19+
20+
RUBY_PLATFORM = 'opal'
21+
RUBY_ENGINE = 'opal'
22+
RUBY_VERSION = '2.0.0'
23+
RUBY_ENGINE_VERSION = '0.6.0'
24+
RUBY_RELEASE_DATE = '2013-11-20'

opal/opal.rb

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,4 @@
2727
require 'corelib/struct'
2828
require 'corelib/io'
2929
require 'corelib/main'
30-
31-
# regexp matches
32-
$& = $~ = $` = $' = nil
33-
34-
# stub library path
35-
$: = []
36-
$" = []
37-
38-
# split lines
39-
$/ = "\n"
40-
$, = nil
41-
42-
ARGV = []
43-
ARGF = Object.new
44-
ENV = {}
45-
46-
$VERBOSE = false
47-
$DEBUG = false
48-
$SAFE = 0
49-
50-
RUBY_PLATFORM = 'opal'
51-
RUBY_ENGINE = 'opal'
52-
RUBY_VERSION = '2.0.0'
53-
RUBY_ENGINE_VERSION = '0.6.0'
54-
RUBY_RELEASE_DATE = '2013-11-20'
30+
require 'corelib/variables'

0 commit comments

Comments
 (0)