sass 3.4.23 → 3.4.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87969e0a80091cd78a2acae89e1fcb30abedcebf
4
- data.tar.gz: d7297b39a2a1e46434b89fec0ba878b671a29e14
3
+ metadata.gz: 798967a96737a6978563e8b46a97cf3254d1bd54
4
+ data.tar.gz: 57ed07a4077a5d81a9b821da7b7f4dcffb939fd2
5
5
  SHA512:
6
- metadata.gz: 96e87063a0f068712aeb63593e7861f69db072d306b6005c8a49780bf9553bca1dc1bbfa7d4cef1a8a29d1f198aa636823260af4eaed0f75c0fb45a08c903526
7
- data.tar.gz: 8bb8cef35fc3c2d5dd4be949d1a0ebd075f6468dc37d97c8d0af8252ab213788cc66350d636153877a4fa025bf42955ab7a209e8c3401d63b7e8fdea3ac5316e
6
+ metadata.gz: a86659601d7713959b8213d53a09ced83a3d3eb09eb64fdcab54fcba0e3f4b05477db9ded2f30c7e77a44f078115ee9b6efed016f868b40e725e40d7bb4a1d3e
7
+ data.tar.gz: 42da27fb2cd7325d5df8404ea20bd6e4d57f926ee835f266120dc2fbd2beee43a7dc2e8932d136365c43f26a66fe019457a46afe376578ce11a8abc2316625cc
data/.yardopts CHANGED
@@ -1,6 +1,6 @@
1
1
  --readme README.md
2
2
  --markup markdown
3
- --markup-provider maruku
3
+ --markup-provider redcarpet
4
4
  --default-return ""
5
5
  --title "Sass Documentation"
6
6
  --query 'object.type != :classvariable'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.4.23
1
+ 3.4.24
@@ -1 +1 @@
1
- 19 December 2016 23:15:42 UTC
1
+ 19 May 2017 00:01:41 UTC
@@ -94,13 +94,13 @@ module Sass
94
94
  # `text`: `String`
95
95
  # : The text in the line, without any whitespace at the beginning or end.
96
96
  #
97
- # `tabs`: `Fixnum`
97
+ # `tabs`: `Integer`
98
98
  # : The level of indentation of the line.
99
99
  #
100
- # `index`: `Fixnum`
100
+ # `index`: `Integer`
101
101
  # : The line number in the original document.
102
102
  #
103
- # `offset`: `Fixnum`
103
+ # `offset`: `Integer`
104
104
  # : The number of bytes in on the line that the text begins.
105
105
  # This ends up being the number of bytes of leading whitespace.
106
106
  #
@@ -69,14 +69,14 @@ module Sass
69
69
  # The name of the mixin in which the error occurred.
70
70
  # This could be `nil` if the error occurred outside a mixin.
71
71
  #
72
- # @return [Fixnum]
72
+ # @return [String]
73
73
  def sass_mixin
74
74
  sass_backtrace.first[:mixin]
75
75
  end
76
76
 
77
77
  # The line of the Sass template on which the error occurred.
78
78
  #
79
- # @return [Fixnum]
79
+ # @return [Integer]
80
80
  def sass_line
81
81
  sass_backtrace.first[:line]
82
82
  end
@@ -153,7 +153,7 @@ module Sass
153
153
  # Returns an error report for an exception in CSS format.
154
154
  #
155
155
  # @param e [Exception]
156
- # @param line_offset [Fixnum] The number of the first line of the Sass template.
156
+ # @param line_offset [Integer] The number of the first line of the Sass template.
157
157
  # @return [String] The error report
158
158
  # @raise [Exception] `e`, if the
159
159
  # {file:SASS_REFERENCE.md#full_exception-option `:full_exception`} option
@@ -9,7 +9,7 @@ module Sass
9
9
  #
10
10
  # ## Customize
11
11
  #
12
- # Sass::Plugin.options.merge(
12
+ # Sass::Plugin.options.merge!(
13
13
  # :cache_location => './tmp/sass-cache',
14
14
  # :never_update => environment != :production,
15
15
  # :full_exception => environment != :production)
@@ -72,7 +72,7 @@ module Sass
72
72
  # Returns whether a Sass or SCSS stylesheet has been modified since a given time.
73
73
  #
74
74
  # @param template_file [String] The location of the Sass or SCSS template.
75
- # @param mtime [Fixnum] The modification time to check against.
75
+ # @param mtime [Time] The modification time to check against.
76
76
  # @param importer [Sass::Importers::Base] The importer used to locate the stylesheet.
77
77
  # Defaults to the filesystem importer.
78
78
  # @return [Boolean] Whether the stylesheet has been modified.
@@ -103,7 +103,7 @@ module Sass
103
103
  # so it's better to use when checking multiple stylesheets at once.
104
104
  #
105
105
  # @param template_file [String] The location of the Sass or SCSS template.
106
- # @param mtime [Fixnum] The modification time to check against.
106
+ # @param mtime [Time] The modification time to check against.
107
107
  # @param importer [Sass::Importers::Base] The importer used to locate the stylesheet.
108
108
  # Defaults to the filesystem importer.
109
109
  # @return [Boolean] Whether the stylesheet has been modified.
@@ -16,9 +16,9 @@ module Sass
16
16
  # Parses a string of SassScript
17
17
  #
18
18
  # @param value [String] The SassScript
19
- # @param line [Fixnum] The number of the line on which the SassScript appeared.
19
+ # @param line [Integer] The number of the line on which the SassScript appeared.
20
20
  # Used for error reporting
21
- # @param offset [Fixnum] The number of characters in on `line` that the SassScript started.
21
+ # @param offset [Integer] The number of characters in on `line` that the SassScript started.
22
22
  # Used for error reporting
23
23
  # @param options [{Symbol => Object}] An options hash;
24
24
  # see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
@@ -431,8 +431,8 @@ module Sass::Script
431
431
  # If no signatures match, the first signature is returned for error messaging.
432
432
  #
433
433
  # @param method_name [Symbol] The name of the Ruby function to be called.
434
- # @param arg_arity [Fixnum] The number of unnamed arguments the function was passed.
435
- # @param kwarg_arity [Fixnum] The number of keyword arguments the function was passed.
434
+ # @param arg_arity [Integer] The number of unnamed arguments the function was passed.
435
+ # @param kwarg_arity [Integer] The number of keyword arguments the function was passed.
436
436
  #
437
437
  # @return [{Symbol => Object}, nil]
438
438
  # The signature options for the matching signature,
@@ -1583,7 +1583,7 @@ MESSAGE
1583
1583
  # @raise [ArgumentError] if `$string` isn't a string
1584
1584
  def to_upper_case(string)
1585
1585
  assert_type string, :String, :string
1586
- Sass::Script::Value::String.new(string.value.upcase, string.type)
1586
+ Sass::Script::Value::String.new(Sass::Util.upcase(string.value), string.type)
1587
1587
  end
1588
1588
  declare :to_upper_case, [:string]
1589
1589
 
@@ -1598,7 +1598,7 @@ MESSAGE
1598
1598
  # @raise [ArgumentError] if `$string` isn't a string
1599
1599
  def to_lower_case(string)
1600
1600
  assert_type string, :String, :string
1601
- Sass::Script::Value::String.new(string.value.downcase, string.type)
1601
+ Sass::Script::Value::String.new(Sass::Util.downcase(string.value), string.type)
1602
1602
  end
1603
1603
  declare :to_lower_case, [:string]
1604
1604
 
@@ -19,13 +19,13 @@ module Sass
19
19
  # `source_range`: \[`Sass::Source::Range`\]
20
20
  # : The range in the source file in which the token appeared.
21
21
  #
22
- # `pos`: \[`Fixnum`\]
22
+ # `pos`: \[`Integer`\]
23
23
  # : The scanner position at which the SassScript token appeared.
24
24
  Token = Struct.new(:type, :value, :source_range, :pos)
25
25
 
26
26
  # The line number of the lexer's current position.
27
27
  #
28
- # @return [Fixnum]
28
+ # @return [Integer]
29
29
  def line
30
30
  return @line unless @tok
31
31
  @tok.source_range.start_pos.line
@@ -34,7 +34,7 @@ module Sass
34
34
  # The number of bytes into the current line
35
35
  # of the lexer's current position (1-based).
36
36
  #
37
- # @return [Fixnum]
37
+ # @return [Integer]
38
38
  def offset
39
39
  return @offset unless @tok
40
40
  @tok.source_range.start_pos.offset
@@ -142,9 +142,9 @@ module Sass
142
142
  }
143
143
 
144
144
  # @param str [String, StringScanner] The source text to lex
145
- # @param line [Fixnum] The 1-based line on which the SassScript appears.
145
+ # @param line [Integer] The 1-based line on which the SassScript appears.
146
146
  # Used for error reporting and sourcemap building
147
- # @param offset [Fixnum] The 1-based character (not byte) offset in the line in the source.
147
+ # @param offset [Integer] The 1-based character (not byte) offset in the line in the source.
148
148
  # Used for error reporting and sourcemap building
149
149
  # @param options [{Symbol => Object}] An options hash;
150
150
  # see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}
@@ -8,22 +8,22 @@ module Sass
8
8
  class Parser
9
9
  # The line number of the parser's current position.
10
10
  #
11
- # @return [Fixnum]
11
+ # @return [Integer]
12
12
  def line
13
13
  @lexer.line
14
14
  end
15
15
 
16
16
  # The column number of the parser's current position.
17
17
  #
18
- # @return [Fixnum]
18
+ # @return [Integer]
19
19
  def offset
20
20
  @lexer.offset
21
21
  end
22
22
 
23
23
  # @param str [String, StringScanner] The source text to parse
24
- # @param line [Fixnum] The line on which the SassScript appears.
24
+ # @param line [Integer] The line on which the SassScript appears.
25
25
  # Used for error reporting and sourcemap building
26
- # @param offset [Fixnum] The character (not byte) offset where the script starts in the line.
26
+ # @param offset [Integer] The character (not byte) offset where the script starts in the line.
27
27
  # Used for error reporting and sourcemap building
28
28
  # @param options [{Symbol => Object}] An options hash; see
29
29
  # {file:SASS_REFERENCE.md#sass_options the Sass options documentation}.
@@ -10,7 +10,7 @@ module Sass::Script::Tree
10
10
 
11
11
  # The line of the document on which this node appeared.
12
12
  #
13
- # @return [Fixnum]
13
+ # @return [Integer]
14
14
  attr_accessor :line
15
15
 
16
16
  # The source range in the document on which this node appeared.
@@ -149,7 +149,7 @@ MSG
149
149
  # Returns the hash code of this value. Two objects' hash codes should be
150
150
  # equal if the objects are equal.
151
151
  #
152
- # @return [Fixnum] The hash code.
152
+ # @return [Integer for Ruby 2.4.0+, Fixnum for earlier Ruby versions] The hash code.
153
153
  def hash
154
154
  value.hash
155
155
  end
@@ -176,7 +176,7 @@ MSG
176
176
  eq(other).to_bool
177
177
  end
178
178
 
179
- # @return [Fixnum] The integer value of this value
179
+ # @return [Integer] The integer value of this value
180
180
  # @raise [Sass::SyntaxError] if this value isn't an integer
181
181
  def to_i
182
182
  raise Sass::SyntaxError.new("#{inspect} is not an integer.")
@@ -17,8 +17,8 @@ module Sass::Script::Value
17
17
  # @private
18
18
  #
19
19
  # Convert a ruby integer to a rgba components
20
- # @param color [Fixnum]
21
- # @return [Array<Fixnum>] Array of 4 numbers representing r,g,b and alpha
20
+ # @param color [Integer]
21
+ # @return [Array<Integer>] Array of 4 numbers representing r,g,b and alpha
22
22
  def self.int_to_rgba(color)
23
23
  rgba = (0..3).map {|n| color >> (n << 3) & 0xff}.reverse
24
24
  rgba[-1] = rgba[-1] / 255.0
@@ -293,7 +293,7 @@ module Sass::Script::Value
293
293
 
294
294
  # The red component of the color.
295
295
  #
296
- # @return [Fixnum]
296
+ # @return [Integer]
297
297
  def red
298
298
  hsl_to_rgb!
299
299
  @attrs[:red]
@@ -301,7 +301,7 @@ module Sass::Script::Value
301
301
 
302
302
  # The green component of the color.
303
303
  #
304
- # @return [Fixnum]
304
+ # @return [Integer]
305
305
  def green
306
306
  hsl_to_rgb!
307
307
  @attrs[:green]
@@ -309,7 +309,7 @@ module Sass::Script::Value
309
309
 
310
310
  # The blue component of the color.
311
311
  #
312
- # @return [Fixnum]
312
+ # @return [Integer]
313
313
  def blue
314
314
  hsl_to_rgb!
315
315
  @attrs[:blue]
@@ -342,7 +342,7 @@ module Sass::Script::Value
342
342
  # The alpha channel (opacity) of the color.
343
343
  # This is 1 unless otherwise defined.
344
344
  #
345
- # @return [Fixnum]
345
+ # @return [Integer]
346
346
  def alpha
347
347
  @attrs[:alpha].to_f
348
348
  end
@@ -357,7 +357,7 @@ module Sass::Script::Value
357
357
 
358
358
  # Returns the red, green, and blue components of the color.
359
359
  #
360
- # @return [Array<Fixnum>] A frozen three-element array of the red, green, and blue
360
+ # @return [Array<Integer>] A frozen three-element array of the red, green, and blue
361
361
  # values (respectively) of the color
362
362
  def rgb
363
363
  [red, green, blue].freeze
@@ -365,7 +365,7 @@ module Sass::Script::Value
365
365
 
366
366
  # Returns the red, green, blue, and alpha components of the color.
367
367
  #
368
- # @return [Array<Fixnum>] A frozen four-element array of the red, green,
368
+ # @return [Array<Integer>] A frozen four-element array of the red, green,
369
369
  # blue, and alpha values (respectively) of the color
370
370
  def rgba
371
371
  [red, green, blue, alpha].freeze
@@ -373,7 +373,7 @@ module Sass::Script::Value
373
373
 
374
374
  # Returns the hue, saturation, and lightness components of the color.
375
375
  #
376
- # @return [Array<Fixnum>] A frozen three-element array of the
376
+ # @return [Array<Integer>] A frozen three-element array of the
377
377
  # hue, saturation, and lightness values (respectively) of the color
378
378
  def hsl
379
379
  [hue, saturation, lightness].freeze
@@ -381,7 +381,7 @@ module Sass::Script::Value
381
381
 
382
382
  # Returns the hue, saturation, lightness, and alpha components of the color.
383
383
  #
384
- # @return [Array<Fixnum>] A frozen four-element array of the hue,
384
+ # @return [Array<Integer>] A frozen four-element array of the hue,
385
385
  # saturation, lightness, and alpha values (respectively) of the color
386
386
  def hsla
387
387
  [hue, saturation, lightness, alpha].freeze
@@ -306,7 +306,7 @@ module Sass::Script::Value
306
306
  end
307
307
  alias_method :to_sass, :inspect
308
308
 
309
- # @return [Fixnum] The integer value of the number
309
+ # @return [Integer] The integer value of the number
310
310
  # @raise [Sass::SyntaxError] if the number isn't an integer
311
311
  def to_i
312
312
  super unless int?
@@ -16,9 +16,9 @@ module Sass
16
16
  # warnings and source maps.
17
17
  # @param importer [Sass::Importers::Base] The importer used to import the
18
18
  # file being parsed. Used for source maps.
19
- # @param line [Fixnum] The 1-based line on which the source string appeared,
19
+ # @param line [Integer] The 1-based line on which the source string appeared,
20
20
  # if it's part of another document.
21
- # @param offset [Fixnum] The 1-based character (not byte) offset in the line on
21
+ # @param offset [Integer] The 1-based character (not byte) offset in the line on
22
22
  # which the source string starts. Used for error reporting and sourcemap
23
23
  # building.
24
24
  def initialize(str, filename, importer, line = 1, offset = 1)
@@ -1022,7 +1022,7 @@ WARNING
1022
1022
  end
1023
1023
 
1024
1024
  def str
1025
- @strs.push ""
1025
+ @strs.push String.new("")
1026
1026
  yield
1027
1027
  @strs.last
1028
1028
  ensure
@@ -40,7 +40,7 @@ module Sass
40
40
  # escaping all significant characters.
41
41
  #
42
42
  # @param str [String] The text of the regexp
43
- # @param flags [Fixnum] Flags for the created regular expression
43
+ # @param flags [Integer] Flags for the created regular expression
44
44
  # @return [Regexp]
45
45
  # @private
46
46
  def self.quote(str, flags = 0)
@@ -8,7 +8,7 @@ module Sass
8
8
  class AbstractSequence
9
9
  # The line of the Sass template on which this selector was declared.
10
10
  #
11
- # @return [Fixnum]
11
+ # @return [Integer]
12
12
  attr_reader :line
13
13
 
14
14
  # The name of the file in which this selector was declared.
@@ -19,8 +19,8 @@ module Sass
19
19
  # Sets the line of the Sass template on which this selector was declared.
20
20
  # This also sets the line for all child selectors.
21
21
  #
22
- # @param line [Fixnum]
23
- # @return [Fixnum]
22
+ # @param line [Integer]
23
+ # @return [Integer]
24
24
  def line=(line)
25
25
  members.each {|m| m.line = line}
26
26
  @line = line
@@ -42,7 +42,7 @@ module Sass
42
42
  # Subclasses should define `#_hash` rather than overriding this method,
43
43
  # which automatically handles memoizing the result.
44
44
  #
45
- # @return [Fixnum]
45
+ # @return [Integer]
46
46
  def hash
47
47
  @_hash ||= _hash
48
48
  end
@@ -83,7 +83,7 @@ module Sass
83
83
  # The base is given by {Sass::Selector::SPECIFICITY_BASE}. This can be a
84
84
  # number or a range representing possible specificities.
85
85
  #
86
- # @return [Fixnum, Range]
86
+ # @return [Integer, Range]
87
87
  def specificity
88
88
  _specificity(members)
89
89
  end
@@ -6,8 +6,8 @@ module Sass
6
6
  # Sets the line of the Sass template on which this selector was declared.
7
7
  # This also sets the line for all child selectors.
8
8
  #
9
- # @param line [Fixnum]
10
- # @return [Fixnum]
9
+ # @param line [Integer]
10
+ # @return [Integer]
11
11
  def line=(line)
12
12
  members.each {|m| m.line = line if m.is_a?(SimpleSequence)}
13
13
  @line = line
@@ -5,7 +5,7 @@ module Sass
5
5
  class Simple
6
6
  # The line of the Sass template on which this selector was declared.
7
7
  #
8
- # @return [Fixnum]
8
+ # @return [Integer]
9
9
  attr_accessor :line
10
10
 
11
11
  # The name of the file in which this selector was declared,
@@ -36,7 +36,7 @@ module Sass
36
36
  # so if that contains information irrelevant to the identity of the selector,
37
37
  # this should be overridden.
38
38
  #
39
- # @return [Fixnum]
39
+ # @return [Integer]
40
40
  def hash
41
41
  @_hash ||= equality_key.hash
42
42
  end
@@ -106,10 +106,10 @@ module Sass
106
106
  # could be found at all.
107
107
  # If the second value is `false`, the first should be ignored.
108
108
  def unify_namespaces(ns1, ns2)
109
- return nil, false unless ns1 == ns2 || ns1.nil? || ns1 == '*' || ns2.nil? || ns2 == '*'
110
109
  return ns2, true if ns1 == '*'
111
110
  return ns1, true if ns2 == '*'
112
- [ns1 || ns2, true]
111
+ return nil, false unless ns1 == ns2
112
+ [ns1, true]
113
113
  end
114
114
  end
115
115
  end
@@ -31,7 +31,7 @@ module Sass
31
31
  # A `Fixnum` in 1.8, a `String` in 1.9
32
32
  # @param finish [Character] The character closing the balanced pair.
33
33
  # A `Fixnum` in 1.8, a `String` in 1.9
34
- # @param count [Fixnum] The number of opening characters matched
34
+ # @param count [Integer] The number of opening characters matched
35
35
  # before calling this method
36
36
  # @return [(String, String)] The string matched within the balanced pair
37
37
  # and the rest of the string.
@@ -37,7 +37,7 @@ module Sass::Source
37
37
 
38
38
  # Shifts all output source ranges forward one or more lines.
39
39
  #
40
- # @param delta [Fixnum] The number of lines to shift the ranges forward.
40
+ # @param delta [Integer] The number of lines to shift the ranges forward.
41
41
  def shift_output_lines(delta)
42
42
  return if delta == 0
43
43
  @data.each do |m|
@@ -49,7 +49,7 @@ module Sass::Source
49
49
  # Shifts any output source ranges that lie on the first line forward one or
50
50
  # more characters on that line.
51
51
  #
52
- # @param delta [Fixnum] The number of characters to shift the ranges
52
+ # @param delta [Integer] The number of characters to shift the ranges
53
53
  # forward.
54
54
  def shift_output_offsets(delta)
55
55
  return if delta == 0
@@ -2,17 +2,17 @@ module Sass::Source
2
2
  class Position
3
3
  # The one-based line of the document associated with the position.
4
4
  #
5
- # @return [Fixnum]
5
+ # @return [Integer]
6
6
  attr_accessor :line
7
7
 
8
8
  # The one-based offset in the line of the document associated with the
9
9
  # position.
10
10
  #
11
- # @return [Fixnum]
11
+ # @return [Integer]
12
12
  attr_accessor :offset
13
13
 
14
- # @param line [Fixnum] The source line
15
- # @param offset [Fixnum] The source offset
14
+ # @param line [Integer] The source line
15
+ # @param offset [Integer] The source offset
16
16
  def initialize(line, offset)
17
17
  @line = line
18
18
  @offset = offset
@@ -59,7 +59,7 @@ module Sass::Tree
59
59
 
60
60
  # Returns the number of lines in the comment.
61
61
  #
62
- # @return [Fixnum]
62
+ # @return [Integer]
63
63
  def lines
64
64
  @value.inject(0) do |s, e|
65
65
  next s + e.count("\n") if e.is_a?(String)
@@ -69,7 +69,7 @@ module Sass
69
69
 
70
70
  # The line of the document on which this node appeared.
71
71
  #
72
- # @return [Fixnum]
72
+ # @return [Integer]
73
73
  attr_accessor :line
74
74
 
75
75
  # The source range in the document on which this node appeared.
@@ -39,7 +39,7 @@ module Sass::Tree
39
39
  # * This is a child property of another property
40
40
  # * The parent property has a value, and thus will be rendered
41
41
  #
42
- # @return [Fixnum]
42
+ # @return [Integer]
43
43
  attr_accessor :tabs
44
44
 
45
45
  # The source range in which the property name appears.
@@ -40,7 +40,7 @@ module Sass::Tree
40
40
  # * This is a child rule of another rule
41
41
  # * The parent rule has properties, and thus will be rendered
42
42
  #
43
- # @return [Fixnum]
43
+ # @return [Integer]
44
44
  attr_accessor :tabs
45
45
 
46
46
  # The entire selector source range for this rule.
@@ -12,7 +12,7 @@ class Sass::Tree::Visitors::ToCss < Sass::Tree::Visitors::Base
12
12
  @tabs = 0
13
13
  @line = 1
14
14
  @offset = 1
15
- @result = ""
15
+ @result = String.new("")
16
16
  @source_mapping = build_source_mapping ? Sass::Source::Map.new : nil
17
17
  @lstrip = nil
18
18
  @in_directive = false
@@ -339,6 +339,18 @@ module Sass
339
339
  arr
340
340
  end
341
341
 
342
+ # Like `String.upcase`, but only ever upcases ASCII letters.
343
+ def upcase(string)
344
+ return string.upcase unless ruby2_4?
345
+ string.upcase(:ascii)
346
+ end
347
+
348
+ # Like `String.downcase`, but only ever downcases ASCII letters.
349
+ def downcase(string)
350
+ return string.downcase unless ruby2_4?
351
+ string.downcase(:ascii)
352
+ end
353
+
342
354
  # Returns a sub-array of `minuend` containing only elements that are also in
343
355
  # `subtrahend`. Ensures that the return value has the same order as
344
356
  # `minuend`, even on Rubinius where that's not guaranteed by `Array#-`.
@@ -418,7 +430,7 @@ module Sass
418
430
  # Returns information about the caller of the previous method.
419
431
  #
420
432
  # @param entry [String] An entry in the `#caller` list, or a similarly formatted string
421
- # @return [[String, Fixnum, (String, nil)]]
433
+ # @return [[String, Integer, (String, nil)]]
422
434
  # An array containing the filename, line, and method name of the caller.
423
435
  # The method name may be nil
424
436
  def caller_info(entry = nil)
@@ -636,7 +648,7 @@ module Sass
636
648
 
637
649
  # Returns an array of ints representing the JRuby version number.
638
650
  #
639
- # @return [Array<Fixnum>]
651
+ # @return [Array<Integer>]
640
652
  def jruby_version
641
653
  @jruby_version ||= ::JRUBY_VERSION.split(".").map {|s| s.to_i}
642
654
  end
@@ -794,6 +806,19 @@ module Sass
794
806
  @ruby1_9_2 = RUBY_VERSION_COMPONENTS == [1, 9, 2]
795
807
  end
796
808
 
809
+ # Whether or not this is running under Ruby 2.4 or higher.
810
+ #
811
+ # @return [Boolean]
812
+ def ruby2_4?
813
+ return @ruby2_4 if defined?(@ruby2_4)
814
+ @ruby2_4 =
815
+ if RUBY_VERSION_COMPONENTS[0] == 2
816
+ RUBY_VERSION_COMPONENTS[1] >= 4
817
+ else
818
+ RUBY_VERSION_COMPONENTS[0] > 2
819
+ end
820
+ end
821
+
797
822
  # Wehter or not this is running under JRuby 1.6 or lower.
798
823
  def jruby1_6?
799
824
  return @jruby1_6 if defined?(@jruby1_6)
@@ -941,7 +966,7 @@ module Sass
941
966
  # A version of `Enumerable#enum_cons` that works in Ruby 1.8 and 1.9.
942
967
  #
943
968
  # @param enum [Enumerable] The enumerable to get the enumerator for
944
- # @param n [Fixnum] The size of each cons
969
+ # @param n [Integer] The size of each cons
945
970
  # @return [Enumerator] The consed enumerator
946
971
  def enum_cons(enum, n)
947
972
  ruby1_8? ? enum.enum_cons(n) : enum.each_cons(n)
@@ -950,7 +975,7 @@ module Sass
950
975
  # A version of `Enumerable#enum_slice` that works in Ruby 1.8 and 1.9.
951
976
  #
952
977
  # @param enum [Enumerable] The enumerable to get the enumerator for
953
- # @param n [Fixnum] The size of each slice
978
+ # @param n [Integer] The size of each slice
954
979
  # @return [Enumerator] The consed enumerator
955
980
  def enum_slice(enum, n)
956
981
  ruby1_8? ? enum.enum_slice(n) : enum.each_slice(n)
@@ -977,7 +1002,7 @@ module Sass
977
1002
  # Returns the ASCII code of the given character.
978
1003
  #
979
1004
  # @param c [String] All characters but the first are ignored.
980
- # @return [Fixnum] The ASCII code of `c`.
1005
+ # @return [Integer] The ASCII code of `c`.
981
1006
  def ord(c)
982
1007
  ruby1_8? ? c[0] : c.ord
983
1008
  end
@@ -1102,11 +1127,11 @@ module Sass
1102
1127
 
1103
1128
  # Converts the argument into a valid JSON value.
1104
1129
  #
1105
- # @param v [Fixnum, String, Array, Boolean, nil]
1130
+ # @param v [Integer, String, Array, Boolean, nil]
1106
1131
  # @return [String]
1107
1132
  def json_value_of(v)
1108
1133
  case v
1109
- when Fixnum
1134
+ when Integer
1110
1135
  v.to_s
1111
1136
  when String
1112
1137
  "\"" + json_escape_string(v) + "\""
@@ -1139,7 +1164,7 @@ module Sass
1139
1164
 
1140
1165
  # Encodes `value` as VLQ (http://en.wikipedia.org/wiki/VLQ).
1141
1166
  #
1142
- # @param value [Fixnum]
1167
+ # @param value [Integer]
1143
1168
  # @return [String] The encoded value
1144
1169
  def encode_vlq(value)
1145
1170
  if value < 0
@@ -8,7 +8,7 @@ module Sass
8
8
  # if it was installed from Git.
9
9
  module Version
10
10
  # Returns a hash representing the version of Sass.
11
- # The `:major`, `:minor`, and `:teeny` keys have their respective numbers as Fixnums.
11
+ # The `:major`, `:minor`, and `:teeny` keys have their respective numbers as Integers.
12
12
  # The `:name` key has the name of the version.
13
13
  # The `:string` key contains a human-readable string representation of the version.
14
14
  # The `:number` key is the major, minor, and teeny keys separated by periods.
@@ -41,7 +41,7 @@ module Sass
41
41
  # :prerelease_number => 1
42
42
  # }
43
43
  #
44
- # @return [{Symbol => String/Fixnum}] The version hash
44
+ # @return [{Symbol => String/Integer}] The version hash
45
45
  # @comment
46
46
  # rubocop:disable ClassVars
47
47
  def version
@@ -167,42 +167,52 @@ SCSS
167
167
  end
168
168
 
169
169
  def test_universal_unification_with_namespaceless_universal_target
170
+ assert_extend_doesnt_match('ns|*', '.foo', :failed_to_unify, 2) do
171
+ render_unification '*.foo', 'ns|* {@extend .foo}'
172
+ end
173
+
170
174
  assert_unification '*.foo', '* {@extend .foo}', '*'
171
175
  assert_unification '*.foo', '*|* {@extend .foo}', '*'
172
176
  assert_unification '*|*.foo', '* {@extend .foo}', '*|*.foo, *'
173
177
  assert_unification '*|*.foo', '*|* {@extend .foo}', '*|*'
174
- assert_unification '*.foo', 'ns|* {@extend .foo}', '*.foo, ns|*'
175
178
  assert_unification '*|*.foo', 'ns|* {@extend .foo}', '*|*.foo, ns|*'
176
179
  end
177
180
 
178
181
  def test_universal_unification_with_namespaced_universal_target
179
- assert_unification 'ns|*.foo', '* {@extend .foo}', 'ns|*'
180
- assert_unification 'ns|*.foo', '*|* {@extend .foo}', 'ns|*'
182
+ assert_extend_doesnt_match('*', '.foo', :failed_to_unify, 2) do
183
+ render_unification 'ns|*.foo', '* {@extend .foo}'
184
+ end
181
185
 
182
186
  assert_extend_doesnt_match('ns2|*', '.foo', :failed_to_unify, 2) do
183
187
  render_unification 'ns1|*.foo', 'ns2|* {@extend .foo}'
184
188
  end
185
189
 
190
+ assert_unification 'ns|*.foo', '*|* {@extend .foo}', 'ns|*'
186
191
  assert_unification 'ns|*.foo', 'ns|* {@extend .foo}', 'ns|*'
187
192
  end
188
193
 
189
194
  def test_universal_unification_with_namespaceless_element_target
195
+ assert_extend_doesnt_match('ns|*', '.foo', :failed_to_unify, 2) do
196
+ render_unification 'a.foo', 'ns|* {@extend .foo}'
197
+ end
198
+
190
199
  assert_unification 'a.foo', '* {@extend .foo}', 'a'
191
200
  assert_unification 'a.foo', '*|* {@extend .foo}', 'a'
192
201
  assert_unification '*|a.foo', '* {@extend .foo}', '*|a.foo, a'
193
202
  assert_unification '*|a.foo', '*|* {@extend .foo}', '*|a'
194
- assert_unification 'a.foo', 'ns|* {@extend .foo}', 'a.foo, ns|a'
195
203
  assert_unification '*|a.foo', 'ns|* {@extend .foo}', '*|a.foo, ns|a'
196
204
  end
197
205
 
198
206
  def test_universal_unification_with_namespaced_element_target
199
- assert_unification 'ns|a.foo', '* {@extend .foo}', 'ns|a'
200
- assert_unification 'ns|a.foo', '*|* {@extend .foo}', 'ns|a'
207
+ assert_extend_doesnt_match('*', '.foo', :failed_to_unify, 2) do
208
+ render_unification 'ns|a.foo', '* {@extend .foo}'
209
+ end
201
210
 
202
211
  assert_extend_doesnt_match('ns2|*', '.foo', :failed_to_unify, 2) do
203
212
  render_unification 'ns1|a.foo', 'ns2|* {@extend .foo}'
204
213
  end
205
214
 
215
+ assert_unification 'ns|a.foo', '*|* {@extend .foo}', 'ns|a'
206
216
  assert_unification 'ns|a.foo', 'ns|* {@extend .foo}', 'ns|a'
207
217
  end
208
218
 
@@ -214,46 +224,56 @@ SCSS
214
224
  end
215
225
 
216
226
  def test_element_unification_with_namespaceless_universal_target
227
+ assert_extend_doesnt_match('ns|a', '.foo', :failed_to_unify, 2) do
228
+ render_unification '*.foo', 'ns|a {@extend .foo}'
229
+ end
230
+
217
231
  assert_unification '*.foo', 'a {@extend .foo}', '*.foo, a'
218
232
  assert_unification '*.foo', '*|a {@extend .foo}', '*.foo, a'
219
233
  assert_unification '*|*.foo', 'a {@extend .foo}', '*|*.foo, a'
220
234
  assert_unification '*|*.foo', '*|a {@extend .foo}', '*|*.foo, *|a'
221
- assert_unification '*.foo', 'ns|a {@extend .foo}', '*.foo, ns|a'
222
235
  assert_unification '*|*.foo', 'ns|a {@extend .foo}', '*|*.foo, ns|a'
223
236
  end
224
237
 
225
238
  def test_element_unification_with_namespaced_universal_target
226
- assert_unification 'ns|*.foo', 'a {@extend .foo}', 'ns|*.foo, ns|a'
227
- assert_unification 'ns|*.foo', '*|a {@extend .foo}', 'ns|*.foo, ns|a'
239
+ assert_extend_doesnt_match('a', '.foo', :failed_to_unify, 2) do
240
+ render_unification 'ns|*.foo', 'a {@extend .foo}'
241
+ end
228
242
 
229
243
  assert_extend_doesnt_match('ns2|a', '.foo', :failed_to_unify, 2) do
230
244
  render_unification 'ns1|*.foo', 'ns2|a {@extend .foo}'
231
245
  end
232
246
 
247
+ assert_unification 'ns|*.foo', '*|a {@extend .foo}', 'ns|*.foo, ns|a'
233
248
  assert_unification 'ns|*.foo', 'ns|a {@extend .foo}', 'ns|*.foo, ns|a'
234
249
  end
235
250
 
236
251
  def test_element_unification_with_namespaceless_element_target
252
+ assert_extend_doesnt_match('ns|a', '.foo', :failed_to_unify, 2) do
253
+ render_unification 'a.foo', 'ns|a {@extend .foo}'
254
+ end
255
+
256
+ assert_extend_doesnt_match('h1', '.foo', :failed_to_unify, 2) do
257
+ render_unification 'a.foo', 'h1 {@extend .foo}'
258
+ end
259
+
237
260
  assert_unification 'a.foo', 'a {@extend .foo}', 'a'
238
261
  assert_unification 'a.foo', '*|a {@extend .foo}', 'a'
239
262
  assert_unification '*|a.foo', 'a {@extend .foo}', '*|a.foo, a'
240
263
  assert_unification '*|a.foo', '*|a {@extend .foo}', '*|a'
241
- assert_unification 'a.foo', 'ns|a {@extend .foo}', 'a.foo, ns|a'
242
264
  assert_unification '*|a.foo', 'ns|a {@extend .foo}', '*|a.foo, ns|a'
243
-
244
- assert_extend_doesnt_match('h1', '.foo', :failed_to_unify, 2) do
245
- render_unification 'a.foo', 'h1 {@extend .foo}'
246
- end
247
265
  end
248
266
 
249
267
  def test_element_unification_with_namespaced_element_target
250
- assert_unification 'ns|a.foo', 'a {@extend .foo}', 'ns|a'
251
- assert_unification 'ns|a.foo', '*|a {@extend .foo}', 'ns|a'
268
+ assert_extend_doesnt_match('a', '.foo', :failed_to_unify, 2) do
269
+ render_unification 'ns|a.foo', 'a {@extend .foo}'
270
+ end
252
271
 
253
272
  assert_extend_doesnt_match('ns2|a', '.foo', :failed_to_unify, 2) do
254
273
  render_unification 'ns1|a.foo', 'ns2|a {@extend .foo}'
255
274
  end
256
275
 
276
+ assert_unification 'ns|a.foo', '*|a {@extend .foo}', 'ns|a'
257
277
  assert_unification 'ns|a.foo', 'ns|a {@extend .foo}', 'ns|a'
258
278
  end
259
279
 
@@ -567,7 +587,7 @@ SCSS
567
587
  end
568
588
 
569
589
  def test_long_extendee_runs_unification
570
- assert_extends 'ns|*.foo.bar', 'a.baz {@extend .foo.bar}', 'ns|*.foo.bar, ns|a.baz'
590
+ assert_extends 'ns|*.foo.bar', '*|a.baz {@extend .foo.bar}', 'ns|*.foo.bar, ns|a.baz'
571
591
  end
572
592
 
573
593
  ## Long Extenders
@@ -577,7 +597,7 @@ SCSS
577
597
  end
578
598
 
579
599
  def test_long_extender_runs_unification
580
- assert_extends 'ns|*.foo.bar', 'a.baz {@extend .foo}', 'ns|*.foo.bar, ns|a.bar.baz'
600
+ assert_extends 'ns|*.foo.bar', '*|a.baz {@extend .foo}', 'ns|*.foo.bar, ns|a.bar.baz'
581
601
  end
582
602
 
583
603
  def test_long_extender_aborts_unification
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.23
4
+ version: 3.4.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Natalie Weizenbaum
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-19 00:00:00.000000000 Z
13
+ date: 2017-05-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yard
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.5.3
21
+ version: 0.9.8
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 0.5.3
28
+ version: 0.9.8
29
29
  - !ruby/object:Gem::Dependency
30
- name: maruku
30
+ name: redcarpet
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: 0.5.9
35
+ version: 2.3.0
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 0.5.9
42
+ version: 2.3.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: minitest
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -396,34 +396,34 @@ required_rubygems_version: !ruby/object:Gem::Requirement
396
396
  version: '0'
397
397
  requirements: []
398
398
  rubyforge_project: sass
399
- rubygems_version: 2.4.8
399
+ rubygems_version: 2.6.11
400
400
  signing_key:
401
401
  specification_version: 4
402
402
  summary: A powerful but elegant CSS compiler that makes CSS fun again.
403
403
  test_files:
404
- - test/sass/extend_test.rb
405
- - test/sass/css2sass_test.rb
406
- - test/sass/util_test.rb
407
- - test/sass/superselector_test.rb
408
- - test/sass/value_helpers_test.rb
409
404
  - test/sass/plugin_test.rb
410
- - test/sass/logger_test.rb
411
- - test/sass/functions_test.rb
412
- - test/sass/conversion_test.rb
413
- - test/sass/source_map_test.rb
414
- - test/sass/cache_test.rb
415
405
  - test/sass/encoding_test.rb
416
- - test/sass/script_test.rb
406
+ - test/sass/importer_test.rb
417
407
  - test/sass/callbacks_test.rb
418
- - test/sass/script_conversion_test.rb
419
408
  - test/sass/scss/css_test.rb
420
409
  - test/sass/scss/rx_test.rb
421
410
  - test/sass/scss/scss_test.rb
411
+ - test/sass/util/multibyte_string_scanner_test.rb
412
+ - test/sass/util/normalized_map_test.rb
413
+ - test/sass/util/subset_map_test.rb
414
+ - test/sass/functions_test.rb
415
+ - test/sass/util_test.rb
416
+ - test/sass/cache_test.rb
422
417
  - test/sass/exec_test.rb
423
- - test/sass/importer_test.rb
418
+ - test/sass/value_helpers_test.rb
419
+ - test/sass/conversion_test.rb
420
+ - test/sass/script_test.rb
421
+ - test/sass/logger_test.rb
422
+ - test/sass/compiler_test.rb
424
423
  - test/sass/engine_test.rb
424
+ - test/sass/css2sass_test.rb
425
+ - test/sass/superselector_test.rb
426
+ - test/sass/script_conversion_test.rb
425
427
  - test/sass/css_variable_test.rb
426
- - test/sass/compiler_test.rb
427
- - test/sass/util/subset_map_test.rb
428
- - test/sass/util/normalized_map_test.rb
429
- - test/sass/util/multibyte_string_scanner_test.rb
428
+ - test/sass/source_map_test.rb
429
+ - test/sass/extend_test.rb