Skip to content

Commit ba61bac

Browse files
committed
Update to opal 1.0.0.dev (mogztter/opal/asciidoctor@634aa356)
1 parent ea3306a commit ba61bac

File tree

4 files changed

+691
-637
lines changed

4 files changed

+691
-637
lines changed

src/nodejs.js

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,32 @@
11
/* Generated by Opal 1.0.0 */
22
Opal.modules["nodejs/kernel"] = function(Opal) {
3-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
3+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $module = Opal.module;
44

55
Opal.add_stubs(['$warn', '$to_str']);
66

77
Opal.exit = process.exit;
88
(function($base, $parent_nesting) {
99
var self = $module($base, 'Kernel');
1010

11-
var $nesting = [self].concat($parent_nesting), $Kernel_caller$1, $Kernel_node_require$2;
11+
var $nesting = [self].concat($parent_nesting), $Kernel_node_require$1;
1212

1313

1414
Opal.const_set($nesting[0], 'NODE_REQUIRE', require);
1515

16-
Opal.def(self, '$caller', $Kernel_caller$1 = function $$caller($a) {
17-
var $post_args, args, self = this;
18-
19-
20-
21-
$post_args = Opal.slice.call(arguments, 0, arguments.length);
22-
23-
args = $post_args;;
24-
25-
var stack;
26-
try {
27-
var err = Error("my error");
28-
throw err;
29-
} catch(e) {
30-
stack = e.stack;
31-
}
32-
return stack.$split("\n").slice(3);
33-
;
34-
}, $Kernel_caller$1.$$arity = -1);
35-
36-
Opal.def(self, '$node_require', $Kernel_node_require$2 = function $$node_require(path) {
16+
Opal.def(self, '$node_require', $Kernel_node_require$1 = function $$node_require(path) {
3717
var self = this;
3818

3919

4020
self.$warn("[DEPRECATION] node_require is deprecated. Please use `require('module')` instead.");
4121
return $$($nesting, 'NODE_REQUIRE')(path.$to_str());
42-
}, $Kernel_node_require$2.$$arity = 1);
22+
}, $Kernel_node_require$1.$$arity = 1);
4323
})($nesting[0], $nesting);
4424
return Opal.const_set($nesting[0], 'ARGV', process.argv.slice(2));
4525
};
4626

4727
/* Generated by Opal 1.0.0 */
4828
Opal.modules["nodejs/file"] = function(Opal) {
49-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars;
29+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $klass = Opal.klass, $truthy = Opal.truthy, $gvars = Opal.gvars;
5030

5131
Opal.add_stubs(['$raise', '$warn', '$const_get', '$new', '$const_defined?', '$const_set', '$include', '$size', '$respond_to?', '$path', '$join', '$call', '$exist?', '$realpath', '$!=', '$close', '$to_path', '$pwd', '$to_str', '$include?', '$delete', '$match?', '$sub', '$attr_reader', '$to_a', '$each_line', '$to_enum', '$read', '$chomp']);
5232

@@ -520,7 +500,7 @@ Opal.modules["nodejs/file"] = function(Opal) {
520500

521501
/* Generated by Opal 1.0.0 */
522502
Opal.modules["nodejs/dir"] = function(Opal) {
523-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send;
503+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send;
524504

525505
Opal.add_stubs(['$respond_to?', '$flat_map', '$to_path', '$coerce_to!']);
526506
return (function($base, $super, $parent_nesting) {
@@ -619,7 +599,7 @@ Opal.modules["nodejs/io"] = function(Opal) {
619599
function $rb_minus(lhs, rhs) {
620600
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
621601
}
622-
var $$5, $$6, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $lambda = Opal.lambda, $send = Opal.send, $writer = nil;
602+
var $$5, $$6, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $klass = Opal.klass, $lambda = Opal.lambda, $send = Opal.send, $writer = nil;
623603

624604
Opal.add_stubs(['$attr_reader', '$write', '$read', '$write_proc=', '$-', '$tty=']);
625605

@@ -708,7 +688,7 @@ Opal.modules["nodejs/io"] = function(Opal) {
708688

709689
/* Generated by Opal 1.0.0 */
710690
Opal.modules["nodejs/open-uri"] = function(Opal) {
711-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
691+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $module = Opal.module;
712692

713693
return (function($base, $parent_nesting) {
714694
var self = $module($base, 'OpenURI');
@@ -754,7 +734,7 @@ Opal.modules["corelib/comparable"] = function(Opal) {
754734
function $rb_lt(lhs, rhs) {
755735
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
756736
}
757-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $truthy = Opal.truthy;
737+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $module = Opal.module, $truthy = Opal.truthy;
758738

759739
Opal.add_stubs(['$>', '$<', '$===', '$raise', '$class', '$equal?', '$<=>']);
760740
return (function($base, $parent_nesting) {
@@ -885,7 +865,7 @@ Opal.modules["pathname"] = function(Opal) {
885865
function $rb_plus(lhs, rhs) {
886866
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
887867
}
888-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module;
868+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $module = Opal.module;
889869

890870
Opal.add_stubs(['$require', '$include', '$quote', '$===', '$to_s', '$path', '$respond_to?', '$to_path', '$is_a?', '$nil?', '$raise', '$class', '$==', '$attr_reader', '$!', '$relative?', '$chop_basename', '$basename', '$=~', '$new', '$source', '$[]', '$rindex', '$sub', '$absolute?', '$expand_path', '$plus', '$unshift', '$length', '$!=', '$empty?', '$first', '$shift', '$+', '$join', '$dirname', '$pop', '$reverse_each', '$directory?', '$extname', '$<=>', '$nonzero?', '$proc', '$casecmp', '$cleanpath', '$inspect', '$include?', '$fill', '$map', '$entries']);
891871

@@ -898,7 +878,7 @@ Opal.modules["pathname"] = function(Opal) {
898878
self.$$prototype.path = nil;
899879

900880
self.$include($$($nesting, 'Comparable'));
901-
Opal.const_set($nesting[0], 'SEPARATOR_PAT', new RegExp($$($nesting, 'Regexp').$quote($$$($$($nesting, 'File'), 'SEPARATOR'))));
881+
Opal.const_set($nesting[0], 'SEPARATOR_PAT', Opal.regexp([$$($nesting, 'Regexp').$quote($$$($$($nesting, 'File'), 'SEPARATOR'))]));
902882

903883
Opal.def(self, '$initialize', $Pathname_initialize$1 = function $$initialize(path) {
904884
var self = this;
@@ -1062,7 +1042,7 @@ Opal.modules["pathname"] = function(Opal) {
10621042
basename_list2.$shift();
10631043
};
10641044
r1 = self.$chop_basename(prefix1);
1065-
if ($truthy(($truthy($a = r1['$!']()) ? new RegExp($$($nesting, 'SEPARATOR_PAT'))['$=~']($$($nesting, 'File').$basename(prefix1)) : $a))) {
1045+
if ($truthy(($truthy($a = r1['$!']()) ? Opal.regexp([$$($nesting, 'SEPARATOR_PAT')])['$=~']($$($nesting, 'File').$basename(prefix1)) : $a))) {
10661046
while ($truthy(($truthy($b = basename_list2['$empty?']()['$!']()) ? basename_list2.$first()['$==']("..") : $b))) {
10671047

10681048
index_list2.$shift();
@@ -1259,7 +1239,7 @@ Opal.modules["pathname"] = function(Opal) {
12591239

12601240
/* Generated by Opal 1.0.0 */
12611241
Opal.modules["nodejs/pathname"] = function(Opal) {
1262-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
1242+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $klass = Opal.klass;
12631243

12641244
Opal.add_stubs(['$require', '$include', '$to_str', '$!', '$absolute?']);
12651245

@@ -1297,7 +1277,7 @@ Opal.modules["nodejs/pathname"] = function(Opal) {
12971277

12981278
/* Generated by Opal 1.0.0 */
12991279
Opal.modules["nodejs/env"] = function(Opal) {
1300-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice;
1280+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$;
13011281

13021282
Opal.add_stubs(['$new', '$to_s']);
13031283

@@ -1359,7 +1339,7 @@ Opal.modules["nodejs/env"] = function(Opal) {
13591339

13601340
/* Generated by Opal 1.0.0 */
13611341
Opal.modules["nodejs"] = function(Opal) {
1362-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
1342+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$, $$ = Opal.$$, $module = Opal.module;
13631343

13641344
Opal.add_stubs(['$require']);
13651345

0 commit comments

Comments
 (0)