This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (gdb) run | |
| The program being debugged has been started already. | |
| Start it from the beginning? (y or n) y | |
| Starting program: /home/daniel/Dev/rbx-llvm/bin/rbx | |
| [Thread debugging using libthread_db enabled] | |
| [New Thread 0x7f3468a41700 (LWP 28200)] | |
| [Switching to Thread 0x7f3468a41700 (LWP 28200)] | |
| Breakpoint 2, VMMethod (this=0x1e1e810, state=0x1de9580, meth=0x7f346720a518) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ bin/rbx -Xjit.enabled -e '' | |
| exception detected at toplevel: (StackError) | |
| kernel/alpha.rb:20 | |
| kernel/delta/kernel.rb:47 | |
| kernel/bootstrap/kernel.rb:43 | |
| kernel/delta/kernel.rb:18 | |
| kernel/delta/kernel.rb:47 | |
| kernel/bootstrap/kernel.rb:43 | |
| kernel/delta/kernel.rb:18 | |
| kernel/delta/kernel.rb:47 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git i/vm/llvm/jit_operations.hpp w/vm/llvm/jit_operations.hpp | |
| index f55a771..aa15021 100644 | |
| --- i/vm/llvm/jit_operations.hpp | |
| +++ w/vm/llvm/jit_operations.hpp | |
| @@ -293,7 +293,7 @@ namespace rubinius { | |
| Value* ptrtoint(Value* ptr) { | |
| return CastInst::Create( | |
| Instruction::PtrToInt, | |
| - ptr, Type::Int32Ty, "ptr2int", block_); | |
| + ptr, IntPtrTy, "ptr2int", block_); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function(){ | |
| $("#tactics form").submit(function(e){ | |
| e.preventDefault(); | |
| }); | |
| //syntax highlight | |
| ChiliBook.recipeFolder = "./"; | |
| //observação: criei variáveis globais aqui a nivel de exemplo, mas isso não é recomendado. O ideal é criar objetos para armazenar esses valores. ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # let's define this (bash) function to help us see what's happening: | |
| args() { echo "${#@} arguments:"; for arg in "$@"; do echo "-> $arg"; done; } | |
| # now let's see the differences between $@ and $*: | |
| # $*: expands into a series of words, basically ignoring all the quotes | |
| # you'll hardly ever want to do this | |
| test() { args $*; } | |
| test a "b b" c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env ruby1.9 | |
| puts 1.upto(100).to_a.join("\n"). | |
| gsub(%r{ | |
| (?# matchers for multiples of 3 -- remainder=0,1,2 respectively) | |
| (?<z>[0369]+(?:\g<u>\g<d>|\g<d>\g<u>)?|\g<u>\g<d>|\g<d>\g<u>){0} | |
| (?<u>[147]\g<z>?|[258][0369]*\g<d>){0} | |
| (?<d>[258]\g<z>?|[147][0369]*\g<u>){0} | |
| (?# fizz/buzz matchers) | |
| (?<fizz>\g<z>){0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var re1 = /test/; | |
| var re2 = new RegExp(re1); | |
| assert(re1 !== re2, "new RegExp() should always return a new object"); | |
| var scanner = /foo/g; | |
| scanner.lastIndex = 3; | |
| var copy = new RegExp(scanner); | |
| assert(copy.lastIndex === 0, "new RegExp(...) should never copy lastIndex"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -ex | |
| mkdir -p /tmp/repro-6074 | |
| cd /tmp/repro-6074 | |
| bundle env | |
| # Bundler 1.15.4 | |
| # Rubygems 2.6.13 | |
| # Ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16] |