Skip to content

Commit

Permalink
Make all linters happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
iliabylich authored and elia committed Dec 30, 2018
1 parent 32927b5 commit a1c0503
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/opal/nodes/base.rb
Expand Up @@ -169,7 +169,7 @@ def class_variable_owner_nesting_level
cvar_scope = scope
nesting_level = 0

while cvar_scope && !(cvar_scope.class_scope?)
while cvar_scope && !cvar_scope.class_scope?
# Needs only `class << self`, `module`, and `class`
# can increase nesting, but `class` & `module` are
# covered by `class_scope?`.
Expand Down
12 changes: 7 additions & 5 deletions opal/corelib/runtime.js
Expand Up @@ -400,7 +400,7 @@
// @return new [Class] or existing ruby class
//
Opal.allocate_class = function(name, superclass) {
var constructor;
var klass, constructor;

if (superclass != null && superclass.$$bridge) {
// Inheritance from bridged classes requires
Expand All @@ -417,10 +417,11 @@
constructor = function(){};
}

if (name)
if (name) {
$defineProperty(constructor, 'displayName', '::'+name);
}

var klass = constructor;
klass = constructor;

$defineProperty(klass, '$$name', name);
$defineProperty(klass, '$$constructor', constructor);
Expand Down Expand Up @@ -550,8 +551,9 @@
// @return [Module]
Opal.allocate_module = function(name) {
var constructor = function(){};
if (name)
if (name) {
$defineProperty(constructor, 'displayName', name+'.$$constructor');
}

var module = constructor;

Expand Down Expand Up @@ -606,7 +608,7 @@
}

// Module doesnt exist, create a new one...
module = Opal.allocate_module(name, constructor);
module = Opal.allocate_module(name);
Opal.const_set(scope, name, module);

return module;
Expand Down

0 comments on commit a1c0503

Please sign in to comment.