Reduce Ruby warnings further
This commit reduces to zero all warnings generated internally by Rouge when Ruby is run with warnings enabled.
Wow!! This is AWESOME, @pyrmont !! :clap: :clap:
Just one thought though:
"Is there a way that instance_eval(File.read(File.join(__dir__, <keyword-source>))) could be converted into a method and work as it does currently..?"
@ashmaroli Thanks :) You and @pocke made it a lot easier by clearing up almost all the regular expression warnings.
"Is there a way that
instance_eval(File.read(File.join(__dir__, <keyword-source>)))could be converted into a method and work as it does currently..?"
I'm not sure I follow. instance_eval is a method and each call is wrapped in a memoised method. Could you explain in a bit more detail what you meant?
Could you explain in a bit more detail what you meant?
I was thinking of something along the following lines:
module Rouge
def self.get_kewords(source)
instance_eval(File.read(File.join(__dir__, source)))
end
end
class FooLexer < Rouge::RegexLexer
def self.keywords
@keywords ||= Rouge.get_keywords('foo/keywords.rb")
end
end
But nevermind.., I tested it. Won't work..!!
@pyrmont Can you push the correction to the profiler_memory task separately to master and then update this branch..?
The reason I ask is comparing the memory usage on master and this PR isn't giving concrete results..
@ashmaroli So submit a separate PR, merge the PR and then update this branch against master? The last strep shouldn't be necessary, right? This PR already incorporates the change.
You don't have to submit a PR. You can push the fix directly, can't you? This branch should be updated after wards so that a new build is triggered on Travis
@ashmaroli I can push directly to master but for documentary purposes have avoided doing this. Thanks for submitting #1243 :)
Conflicts galore on this branch..
MathWorks have made it so that the webpage with the MatLab functions requires JavaScript… >_<
This is dependent on PR #1300.
The dependency PR has been merged, so I think this can now move forward.
I can help with the rebase, but I don't think I can update this PR. Meanwhile, I'll add some review notes.