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
[gfm] | |
```python | |
s = "Python syntax highlighting" | |
print s | |
``` | |
[/gfm] |
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
def to_proc | |
Proc.new do |key=undefined| | |
raise ArgumentError, "wrong number of arguments (given 0, expected 1)" if undefined.equal?(key) | |
self[key] | |
end | |
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
require 'sinatra' | |
require 'rethinkdb' | |
include RethinkDB::Shortcuts | |
before do | |
begin | |
@c = r.connect(:host=>"localhost", :port=>28015) |
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
RubyTruffleError: internal implementation error - IllegalFormatFlagsException Flags = '-0' java.util.Formatter$FormatSpecifier.checkNumeric(Formatter.java:3027) | |
/home/travis/build/jruby/jruby/truffle/src/main/ruby/core/string.rb:1780:in `sprintf', args: "%00.5", 11 | |
/home/travis/build/jruby/jruby/truffle/src/main/ruby/core/string.rb:1780:in `%', args: 11 |
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
((InternalGeoBounds) geoBoundsAggregation).toXContent(XContentFactory.jsonBuilder(), null).string() | |
"geo_bounds_aggregation"{"bounds":{"top_left":{"lat":45.8082599658519,"lon":-157.8945400379598},"bottom_right":{"lat":20.895359991118312,"lon":-71.08765605837107}}} |
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
diff --git a/lib/elixir/mix.exs b/lib/elixir/mix.exs | |
index 92355fe..c46c92b 100644 | |
--- a/lib/elixir/mix.exs | |
+++ b/lib/elixir/mix.exs | |
@@ -4,6 +4,7 @@ defmodule Elixir.Mixfile do | |
def project do | |
[app: :elixir, | |
version: System.version, | |
+ test_paths: ["test/elixir"], | |
build_per_environment: false] |
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
language: erlang | |
otp_release: | |
- 18.0 | |
sudo: false | |
before_script: | |
- git clone --depth=1 https://github.com/elixir-lang/elixir.git | |
- cd elixir && make compile && cd .. |
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
diff --git a/lib/ex_unit/lib/ex_unit/cli_formatter.ex b/lib/ex_unit/lib/ex_unit/cli_formatter.ex | |
index a8f3504..cc72acc 100644 | |
--- a/lib/ex_unit/lib/ex_unit/cli_formatter.ex | |
+++ b/lib/ex_unit/lib/ex_unit/cli_formatter.ex | |
@@ -18,7 +18,8 @@ defmodule ExUnit.CLIFormatter do | |
tests_counter: 0, | |
failures_counter: 0, | |
skipped_counter: 0, | |
- invalids_counter: 0 | |
+ invalids_counter: 0, |
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
$ make test | |
==> elixir (compile) | |
==> elixir (eunit) | |
All 194 tests passed. | |
==> elixir (exunit) | |
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
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
defmodule Example do | |
def bar([], s) do | |
:lists.sum(s) | |
end | |
def bar([x|xs], [y|ys]) do | |
x * y + bar(xs, ys) | |
end | |