Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4d3963951cd2
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2e125c868e0b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 26, 2015

  1. Copy the full SHA
    45ca603 View commit details
  2. Merge pull request #1114 from wied03/anon_class_work

    Fix classes defined within anonymous classes
    meh committed Sep 26, 2015
    Copy the full SHA
    2e125c8 View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/opal/nodes/module.rb
3 changes: 2 additions & 1 deletion lib/opal/nodes/module.rb
Original file line number Diff line number Diff line change
@@ -31,7 +31,8 @@ def compile

def name_and_base
if cid.type == :const
[cid[1].to_s, 'self']
# Using $scope.base, not self in case a class is created inside an anonymous class or block
[cid[1].to_s, '$scope.base']
elsif cid.type == :colon2
[cid[2].to_s, expr(cid[1])]
elsif cid.type == :colon3