Skip to content

Instantly share code, notes, and snippets.

Thomas E Enebo enebo

Block or report user

Report or block enebo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View while_1.rb
i = 0
while i < 3
class A
end
i += 1
end
i = 0
while i < 3
class A
end
View a.patch
diff --git a/core/src/main/java/org/jruby/ir/IRBuilder.java b/core/src/main/java/org/jruby/ir/IRBuilder.java
index 9208a821d4..ae31f44d87 100644
--- a/core/src/main/java/org/jruby/ir/IRBuilder.java
+++ b/core/src/main/java/org/jruby/ir/IRBuilder.java
@@ -1392,11 +1392,10 @@ public class IRBuilder {
RubySymbol className = cpath.getName();
Operand container = getContainerFromCPath(cpath);
IRClassBody body = new IRClassBody(manager, scope, className, classNode.getLine(), classNode.getScope());
- Variable classVar = addResultInstr(new DefineClassInstr(createTemporaryVariable(), body, container, superClass));
+ Variable bodyResult = addResultInstr(new DefineClassInstr(createTemporaryVariable(), body, container, superClass));
View environment.rb
puts "HERE.1"
path
elsif error
$stderr.puts "HERE.2"
raise Gel::Error::NoGemfile.new(path: path)
end
end
def self.load_gemfile(path = nil, error: true)
return @gemfile if @gemfile
View RubyOj.java
@JRubyModule(name = "Oj")
public class RubyOj extends RubyModule {
// ...
@JRubyMethod(module = true, required = 1, rest = true)
public static IRubyObject strict_load(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {
OjLibrary oj = resolveOj(self);
Options options = oj.default_options.dup(context);
ParserSource source = processArgs(context, args, options);
return new StrictParse(source, context, options).parse(oj, true, block);
View nonatomic.rb
CallNode
end
def visitInstAsgnNode(node)
if !@last
check_nonatomic if !operator_op_assignment?(node)
elsif parent != @last
check_nonatomic(node, node)
end
@last = nil
View Gemfile.lock
activerecord-jdbcsqlite3-adapter
View a.diff
diff --git a/lib/ruby/stdlib/tracer.rb b/lib/ruby/stdlib/tracer.rb
index faafd803f4..57bec731d7 100644
--- a/lib/ruby/stdlib/tracer.rb
+++ b/lib/ruby/stdlib/tracer.rb
@@ -141,11 +141,11 @@ class Tracer
stdout.print "Trace off\n" if Tracer.verbose?
end
- def add_filter(p = proc) # :nodoc:
+ def add_filter(&p) # :nodoc:
View work.txt
git show ce341a3
commit ce341a313838db73c6dbc535db08419358645d0a
Author: Charles Oliver Nutter <headius@headius.com>
Date: Wed Dec 19 17:10:12 2018 -0600
Ignore closed selectors when returning to pool.
It's unclear why the selector is closing but if it's closed it's
not usable anymore. We can ignore it and a new one will get
created for future use.
View *ielm*.txt
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> (gist-region (region-beginning) (region-end) (y-or-n-p "private? "))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end) (y-or-n-p "private? "))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (region-beginning)
View *ielm*.txt
ELISP> (gist-region (region-beginning) (region-end) (y-or-n-p "private? "))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end) (y-or-n-p "private? "))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end))
*** Eval error *** Wrong type argument: number-or-marker-p, nil
ELISP> (gist-region (region-beginning) (region-end))
You can’t perform that action at this time.