Skip to content

Instantly share code, notes, and snippets.

View chrisseaton's full-sized avatar

Chris Seaton chrisseaton

View GitHub Profile
module A
X = 14
module B
def self.foo
puts X
end
end
end
module MS3
module ModA
end
class A
class << self
include ModA
end
end
end
[exec] PANIC
[exec] java.lang.AssertionError
[exec] at BasicObject#instance_eval
[exec] method = BasicObject#instance_eval(core):core: BasicObject#instance_eval
[exec] declaring module = BasicObject
[exec] declaration frame:
[exec] self = #<Object:0x94>
[exec] block = org.jruby.truffle.runtime.core.RubyProc@dffa7ce
[exec] arguments:
[exec] frame:
a = 'foo<script src="jquery-2.1.1.js"></script>bar'
b = '<script src="jquery-2.1.1.js"></script>'
c = "Bootstrap\\'s JavaScript requires jQuery"
a.gsub(b, c) => "fooBootstrapbars JavaScript requires jQuerybar"
a.gsub(Regexp.quote(b), c) => "foo<script src=\"jquery-2.1.1.js\"></script>bar"
a.gsub(Regexp.quote(b), Regexp.quote(c)) => "foo<script src=\"jquery-2.1.1.js\"></script>bar"
a.gsub(b, Regexp.quote(c)) => "fooBootstrap\\'s\\ JavaScript\\ requires\\ jQuerybar"
I want:
a.replace(b, c) => 'fooBootstrap\\'s JavaScript requires jQuery</script>bar'
// Copyright © 2004-2013 Brent Fulgham
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
# Port of deltablue.py, as documented below, to Ruby.
# Stefan Marr, 2014-04-28
#
# Was: deltablue.py
# =================
#
# Ported for the PyPy project.
# Contributed by Daniel Lindsley
#
# This implementation of the DeltaBlue benchmark was directly ported
[ERROR] Failed to execute goal on project jruby-lib: Could not resolve dependencies for project org.jruby:jruby-lib:pom:9.0.0.0.dev-SNAPSHOT: Failed to collect dependencies at rubygems:krypt:gem:0.0.2 -> rubygems:krypt-core:gem:0.0.2 -> rubygems:krypt-provider-jdk:gem:[0.0.2,0.0.2.0.0.0.0.1): No versions available for rubygems:krypt-provider-jdk:gem:[0.0.2,0.0.2.0.0.0.0.1) within specified range -> [Help 1]
chrisseaton@Chriss-MacBook-Pro:~/Documents/oracle/jruby [master!] $ ruby -e '14.instance_eval { p @foo = 14 }'
-e:1:in `block in <main>': can't modify frozen Fixnum (RuntimeError)
from -e:1:in `instance_eval'
from -e:1:in `<main>'
chrisseaton@Chriss-MacBook-Pro:~/Documents/oracle/jruby [master!] $ bin/jruby -e '14.instance_eval { p @foo = 14 }'
14
chrisseaton@Chriss-MacBook-Pro:~/Documents/oracle/jruby [master!] $ ~/.rbenv/versions/jruby-1.7.16/bin/ruby -e '14.instance_eval { p @foo = 14 }'
14
--- lib/ruby/stdlib/erb.rb 2014-12-21 16:00:01.000000000 +0000
+++ ../rubysl/rubysl-erb/lib/rubysl/erb/erb.rb 2014-12-21 02:19:58.000000000 +0000
@@ -68,7 +68,7 @@
# a magic comment, however, it returns a string in the encoding specified
# by the magic comment.
#
-# # -*- coding: utf-8 -*-
+# # -*- coding: UTF-8 -*-
# require 'erb'
#
=========================== JRuby+Truffle Debug Report ========================
Stopped because:
=========================== Ruby Bracktrace ===========================
at ../test.rb:1:in 'm'
method = m:../test.rb:1
declaring module = Object
declaration frame: