lib/nilac/compile_parallel_assignment.rb in nilac-0.0.4.3.9.7.1 vs lib/nilac/compile_parallel_assignment.rb in nilac-0.0.4.3.9.8
- old
+ new
@@ -12,10 +12,12 @@
javascript_regexp = /(if |while |for |function |function\()/
if input_string.include?("=") and input_string.index(javascript_regexp) == nil and input_string.strip[0..3] != "_ref" and !input_string.split("=")[1].include?("[")
- right_side = input_string.split("=")[1]
+ right_side = input_string.split("=")[1] if input_string.count("=").eql?(1)
+
+ right_side = input_string.split("=",2)[1] if input_string.count("=") > 1
if compact_paranthesis(right_side).include?(",")
splits = right_side.split(",")
\ No newline at end of file