sass 3.3.0.alpha.127 → 3.3.0.alpha.128

Sign up to get free protection for your applications and to get access to all the features.
data/REVISION CHANGED
@@ -1 +1 @@
1
- 37a46f42d51efbb1bb31d4b35c92442d2bed1b98
1
+ d283283c32570b09f5a535083992236aab4e0a93
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.3.0.alpha.127
1
+ 3.3.0.alpha.128
data/VERSION_DATE CHANGED
@@ -1 +1 @@
1
- 18 April 2013 00:24:47 GMT
1
+ 20 April 2013 01:38:19 GMT
@@ -433,7 +433,7 @@ class Sass::Tree::Visitors::Perform < Sass::Tree::Visitors::Base
433
433
  end
434
434
  end
435
435
 
436
- return if mixins.empty?
436
+ return unless mixins.include?(node.name)
437
437
  raise Sass::SyntaxError.new("#{msg} #{node.name} includes itself") if mixins.size == 1
438
438
 
439
439
  msg << "\n" << Sass::Util.enum_cons(mixins.reverse + [node.name], 2).map do |m1, m2|
@@ -520,6 +520,21 @@ MESSAGE
520
520
  assert_hash_has(err.sass_backtrace[2], :mixin => "foo", :line => 2)
521
521
  end
522
522
 
523
+ def test_mixin_loop_with_content
524
+ render <<SASS
525
+ =foo
526
+ @content
527
+ =bar
528
+ +foo
529
+ +bar
530
+ +bar
531
+ SASS
532
+ assert(false, "Exception not raised")
533
+ rescue Sass::SyntaxError => err
534
+ assert_equal("An @include loop has been found: bar includes itself", err.message)
535
+ assert_hash_has(err.sass_backtrace[0], :mixin => "@content", :line => 5)
536
+ end
537
+
523
538
  def test_basic_import_loop_exception
524
539
  import = filename_for_test
525
540
  importer = MockImporter.new
@@ -2416,6 +2431,24 @@ SASS
2416
2431
 
2417
2432
  # Regression tests
2418
2433
 
2434
+ def test_parent_mixin_in_content_nested
2435
+ assert_equal(<<CSS, render(<<SASS))
2436
+ a {
2437
+ b: c; }
2438
+ CSS
2439
+ =foo
2440
+ @content
2441
+
2442
+ =bar
2443
+ +foo
2444
+ +foo
2445
+ a
2446
+ b: c
2447
+
2448
+ +bar
2449
+ SASS
2450
+ end
2451
+
2419
2452
  def test_supports_bubbles
2420
2453
  assert_equal <<CSS, render(<<SASS)
2421
2454
  parent {
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- hash: 592303091
4
+ hash: 592302605
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 0
10
10
  - alpha
11
- - 127
12
- version: 3.3.0.alpha.127
11
+ - 128
12
+ version: 3.3.0.alpha.128
13
13
  platform: ruby
14
14
  authors:
15
15
  - Nathan Weizenbaum
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2013-04-17 00:00:00 -04:00
22
+ date: 2013-04-19 00:00:00 -04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency