[gnome-code-assistance] css: fix compatibility with sass 3.4.22



commit c78c1176665c704ca0421717604fac7e60fcb0a3
Author: Giovanni Campagna <gcampagn cs stanford edu>
Date:   Sun Jun 12 21:40:05 2016 -0700

    css: fix compatibility with sass 3.4.22
    
    I'm not exactly sure what this line of code is doing, but it's
    present in sass 3.4.9 (in tree) and gone in 3.4.22. Furthermore,
    the class Sass::SCSS::ScriptParser is gone in 3.4.22, which makes
    it crash at startup.
    Just conditionally running it seems to work.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765638

 backends/css/app.rb |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/backends/css/app.rb b/backends/css/app.rb
index fbc0292..9234a13 100644
--- a/backends/css/app.rb
+++ b/backends/css/app.rb
@@ -43,14 +43,18 @@ class CssParser < Sass::SCSS::CssParser
     extend ColumnInfo
 
     @sass_script_parser = Class.new(Sass::Script::CssParser)
-    @sass_script_parser.send(:include, Sass::SCSS::ScriptParser)
+    if Sass.version[[:major]]==3 and Sass.version[[:minor]]<22
+      @sass_script_parser.send(:include, Sass::SCSS::ScriptParser)
+    end
 end
 
 class ScssParser < Sass::SCSS::Parser
     extend ColumnInfo
 
     @sass_script_parser = Class.new(Sass::Script::Parser)
-    @sass_script_parser.send(:include, Sass::SCSS::ScriptParser)
+    if Sass.version[[:major]]==3 and Sass.version[[:minor]]<22
+      @sass_script_parser.send(:include, Sass::SCSS::ScriptParser)
+    end
 end
 
 module Gnome::CodeAssistance


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]