Skip to content

Instantly share code, notes, and snippets.

View BanzaiMan's full-sized avatar

Hiro Asari BanzaiMan

View GitHub Profile
$ git shortlog -s | sort -nr | head -20
3695 Charles Oliver Nutter
1268 Thomas Enebo
1000 Ola Bini
870 Marcin Mielżyński
752 Vladimir Sizikov
731 Wayne Meissner
612 Anders Bengtsson
543 Nick Sieger
406 Jan Arne Petersen
Z:\My Documents>ruby mspec\bin\mspec rubyspec\library\win32ole\
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
..................................................................................
Finished in 19.133495 seconds
82 files, 142 examples, 160 expectations, 0 failures, 0 errors
Z:\My Documents>ruby mspec\bin\mspec rubyspec\library\win32ole\
@BanzaiMan
BanzaiMan / gist:517837
Created August 10, 2010 19:35
spec run results with latest JRuby master & Tom's jrwin32ole lib
jruby -J-Djava.library.path=jrwin32ole/lib mspec/bin/mspec -T-Ijrwin32ole/lib rubyspec/library/win32ole/win32ole rubyspec/library/win32ole/win32ole_event/ 2>&1 > results.txt
jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-07-26 49cf9ce) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_21) [amd64-java]
.FE..................FEEE......FFEFEEFE.FFF....
1)
WIN32OLE#_invoke raises ArgumentError if insufficient number of arguments are given FAILED
Expected ArgumentError
but got NativeException (com.jacob.com.ComFailException: Can't map names to dispid:_invoke)
Z:/My Documents/mspec/lib/mspec/expectations/expectations.rb:15:in `fail_with'
$ time java -Xbootclasspath/a:/Users/asari/Development/src/jruby/lib/jruby.jar -jar Development/src/jruby/lib/jruby.jar -e 'puts "hi"'
hi
real 0m0.610s
user 0m0.579s
sys 0m0.085s
$ time java -jar Development/src/jruby/lib/jruby.jar -e 'puts "hi"'
hi
real 0m1.411s
[java] jruby 1.6.0.dev (ruby 1.9.2dev trunk -1) (2010-08-19 5d90f1b) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_20) [x86_64-java]
[java]
[java]
[java] 1)
[java] String#to_f returns 0 for strings with any non-digit in them ERROR
[java] ArgumentError: invalid value for Integer: "0xx5"
[java] /Users/asari/Development/src/jruby/spec/ruby/core/string/to_f_spec.rb:48
[java] /Users/asari/Development/src/jruby/spec/ruby/core/string/to_f_spec.rb:6
[java] /Users/asari/Development/src/jruby/spec/ruby/core/string/to_f_spec.rb:56:in `load'
[java]
jruby -S bundle exec gfrake config
sed -e 's/enable: false/enable: true/' config/glassfish.yml # or equivalent
jruby -S bundle exec glassfish
[system]:glassfish-gem[git:master] $ jruby -J-Djruby.backtrace.style=raw -J-Djruby.debug.fullTrace=true -rubygems -e 'require "asadmin"'
Warning: asadmin extension directory is missing: /Users/asari/Development/src/jruby/lib/ruby/gems/1.8/gems/glassfish-1.0.3.dev-universal-java/lib/lib/asadmin
Use "exit" to exit and "help" for online help.
asadmin> start-domain domain1
java/io/File.java:222:in `<init>': java.lang.NullPointerException: null (NativeException)
from com/sun/enterprise/admin/cli/LocalDomainCommand.java:90:in `initDomain'
from com/sun/enterprise/admin/cli/LocalDomainCommand.java:76:in `validate'
from com/sun/enterprise/admin/cli/CLICommand.java:248:in `execute'
from com/sun/enterprise/admin/cli/MultimodeCommand.java:228:in `executeCommands'
from com/sun/enterprise/admin/cli/MultimodeCommand.java:145:in `executeCommand'
$ unset GEM_PATH
$ export PATH=/usr/bin:/usr/sbin:/bin:/sbin
$ ant clean jar
Buildfile: build.xml
init:
clean:
[delete] Deleting directory /Users/asari/Development/temp/jruby/build
[delete] Deleting directory /Users/asari/Development/temp/jruby/docs/api
[system]:rspec-core[git:master] $ jruby -S rake spec
(in /Users/asari/Development/src/rspec-core)
/usr/local/jruby/bin/jruby -S bundle exec bin/rspec --color "./spec/autotest/failed_results_re_spec.rb" "./spec/autotest/rspec_spec.rb" "./spec/rspec/core_spec.rb" "./spec/rspec/core/command_line_configuration_spec.rb" "./spec/rspec/core/command_line_spec.rb" "./spec/rspec/core/configuration_options_spec.rb" "./spec/rspec/core/configuration_spec.rb" "./spec/rspec/core/deprecations_spec.rb" "./spec/rspec/core/drb_command_line_spec.rb" "./spec/rspec/core/example_group_spec.rb" "./spec/rspec/core/example_spec.rb" "./spec/rspec/core/hooks_filtering_spec.rb" "./spec/rspec/core/hooks_spec.rb" "./spec/rspec/core/kernel_extensions_spec.rb" "./spec/rspec/core/let_spec.rb" "./spec/rspec/core/metadata_spec.rb" "./spec/rspec/core/option_parser_spec.rb" "./spec/rspec/core/pending_example_spec.rb" "./spec/rspec/core/rake_task_spec.rb" "./spec/rspec/core/reporter_spec.rb" "./spec/rspec/core/ruby_project_spec.rb" "./spec/rspec/c
$ git diff --no-ext-diff
diff --git a/src/org/jruby/environment/OSEnvironment.java b/src/org/jruby/environment/OSEnvironment.java
index 9f02a58..ca120db 100644
--- a/src/org/jruby/environment/OSEnvironment.java
+++ b/src/org/jruby/environment/OSEnvironment.java
@@ -90,6 +90,8 @@ public class OSEnvironment {
for (Map.Entry<Object, Object> entry : entrySet) {
String value = (String)entry.getValue();
String key = (String)entry.getKey();
+ if (Platform.IS_WINDOWS)