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 a.diff
diff --git a/Rakefile b/Rakefile
index 2bd2499f..9e36cb96 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,29 @@
+# Common usage
+#
+# rake build:adapters - to build all specific adapter gems and the base gem
+# rake release:do - build:adapters + git tag + push gems
+#
View a.dat
1,4689
2,2389
3,2141
4,3286
5,2059
6,2263
7,1874
8,2041
9,1388
10,1509
View 9.2.7.0.txt
system ~/work/jruby (9.2.7.0) 1155% time jruby --dev -S gem list >output 2>&1
real 0m5.405s
user 0m7.731s
sys 0m0.399s
system ~/work/jruby (9.2.7.0) 1156% time jruby --dev -S gem list >output 2>&1
real 0m5.507s
user 0m7.873s
sys 0m0.395s
View 9.2.7.0.txt
system ~/work/jruby (9.2.7.0) 1242% time jruby -S gem list >/dev/null 2>&1
real 0m8.199s
user 0m32.067s
sys 0m0.579s
system ~/work/jruby (9.2.7.0) 1243% time jruby -S gem list >/dev/null 2>&1
real 0m8.302s
user 0m32.462s
sys 0m0.636s
View heredoc1.rb
obj2 = <<~'VALUE'
line5
line6
line7
line8
VALUE
puts obj2
obj3 = <<~VALUE
line5
line6
View autoload1.rb
cls = []
2.times do |i|
cls[i] = Class.new do
def go
autoload :Autoloaded, 'autoloaded'
p autoload? :Autoloaded
end
View for_emulation.rb
# Thought experiment: 'for' loops have almost zero real world usage and removing
# them as an internal implementation detail from our IR (Internal
# Representation) would simplify our code.
#
# The idea is at build time to replace 'for' with a 'while' and an enumerator.
# This should be semantically equivalent?
#
# The main challenge of 'for' loops is they contain blocks which do not actually
# have their own local variable scope (similar to while loops) but that they
# do call the 'in' exprs .each method. So they need to be passed as blocks
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
You can’t perform that action at this time.