This file contains 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
module Process | |
remove_method :uid | |
def uid | |
puts "Hello" | |
end | |
module_function :uid | |
end |
This file contains 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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by configure, which was | |
generated by GNU Autoconf 2.68. Invocation command line was | |
$ ./configure --prefix=/opt/local | |
## --------- ## | |
## Platform. ## |
This file contains 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
# extconf.rb | |
require 'mkmf' | |
$CFLAGS += " -std=c99" # Doesn't help | |
create_makefile('foo') | |
# foo.c | |
#include "ruby.h" | |
static VALUE foo_bar(VALUE self){ | |
const char* bar = "bar"; |
This file contains 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
jruby 1.7.0.preview1 (ruby-1.9.3-p203) (2012-05-19 00c8c98) (Java HotSpot(TM) Client VM 1. | |
6.0_31) [Windows 7-x86-java] | |
What's all this? | |
c:/jruby/bin/jruby.exe -w -I"lib" -I"c:/jruby/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib" "c:/jruby/lib/ruby/gems/shared/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/test*.rb" | |
C:/jruby/lib/ruby/shared/jruby.rb:1 warning: loading in progress, circular require considered harmful - java | |
require at org/jruby/RubyKernel.java:991 | |
require at C:/jruby/lib/ruby/shared/rubygems/custom_require.rb:36 | |
(root) at C:/jruby/lib/ruby/shared/jruby.rb:1 |
This file contains 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
# Rakefile, in directory c:\users\djberge\foo | |
require 'rake' | |
require 'rake/testtask' | |
Rake::TestTask.new do |t| | |
t.verbose = true | |
t.warning = true | |
end | |
task :default => :test |
This file contains 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
# Last moments before warning spewage on Windows. | |
file:/C:/jruby/lib/jruby.jar!/jruby/path_helper.rb:81: File.exist?(exe) && !File.directory?(exe) | |
(rdb:1) | |
n | |
file:/C:/jruby/lib/jruby.jar!/jruby/path_helper.rb:109: orig_parts |
This file contains 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
require 'ffi' | |
module Process::Functions | |
extend FFI::Library | |
ffi_lib :kernel32 | |
attach_function :CloseHandle, [:ulong], :bool | |
private_class_method :CloseHandle | |
end | |
module Process |
This file contains 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
require 'nokogiri' | |
file = 'world_map.svg' | |
tree = Nokogiri::XML(File.open(file)) | |
str = "var #{File.basename(file, '.svg')} = {\n shapes: {" | |
tree.search('g/g').each do |gs| | |
str << "\n " << gs.attributes['id'].value + ': ' |
This file contains 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
# Ruby 1.9.3-p194 on Windows 7 | |
require 'watir' | |
browser = Watir::Browser.new | |
browser.goto 'http://www.facebook.com' | |
# Result | |
c:/usr/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/ie-class.rb:548:in ` |
This file contains 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
# Ruby 1.9.3-p194 on Windows 7 | |
require 'watir-webdriver' | |
browser = Watir::Browser.new | |
browser.goto 'http://www.facebook.com' | |
# Result | |
c:/usr/lib/ruby/gems/1.9.1/gems/childprocess-0.3.2/lib/childprocess/windows/lib.rb:284:in |