Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'stable'

Conflicts:
	doc-src/SASS_CHANGELOG.md
  • Loading branch information...
commit 50209c8c1a8488b0180e42d5fbb63d1ba0297d54 2 parents cc58837 + 0a2eafd
Natalie Weizenbaum nex3 authored
7 doc-src/SASS_CHANGELOG.md
View
@@ -139,6 +139,13 @@ that make use of `@media` and other directives dynamically.
* `#{}` interpolation is now disallowed in all `@import` statements
except for those using `url()`.
+## 3.1.17 (Unreleased)
+
+* Don't crash when calling `#inspect` on an internal Sass tree object in Ruby
+ 1.9.
+* Fix some bugs in `sass --watch` introduces in 3.1.16. Thanks to [Maher
+ Sallam](https://github.com/Maher4Ever).
+
## 3.1.16
* Fix some bugs in `sass-convert` selector parsing when converting from CSS.
14 lib/sass/plugin/listener.rb
View
@@ -14,20 +14,22 @@ def initialize
end
def directory(path, events)
- (@directories[path] ||= []) << events
+ (@directories[File.expand_path(path)] ||= []) << events
end
def file(path, events)
file_base = File.basename(path)
directory(File.dirname(path), {
- :modified => file_event_fn(events[:modified], file_base),
- :added => file_event_fn(events[:added], file_base),
- :removed => file_event_fn(events[:removed], file_base)
- })
+ :modified => file_event_fn(events[:modified], file_base),
+ :added => file_event_fn(events[:added], file_base),
+ :removed => file_event_fn(events[:removed], file_base)
+ })
end
def start!
- listener = Listen::MultiListener.new(*@directories.keys) do |modified, added, removed|
+ args = @directories.keys.dup
+ args << {:force_polling => Sass::Util.windows?}
+ listener = Listen::MultiListener.new(*args) do |modified, added, removed|
modified = modified.group_by {|path| File.dirname(path)}
added = added.group_by {|path| File.dirname(path)}
removed = removed.group_by {|path| File.dirname(path)}
8 lib/sass/tree/node.rb
View
@@ -133,6 +133,14 @@ def to_s
Sass::Tree::Visitors::ToCss.visit(self)
end
+ # Returns a representation of the node for debugging purposes.
+ #
+ # @return [String]
+ def inspect
+ return self.class.to_s unless has_children
+ "(#{self.class} #{children.map {|c| c.inspect}.join(' ')})"
+ end
+
# Converts a static CSS tree (e.g. the output of \{Tree::Visitors::Cssize})
# into another static CSS tree,
# with the given extensions applied to all relevant {RuleNode}s.
Please sign in to comment.
Something went wrong with that request. Please try again.