summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml16
-rw-r--r--.github/workflows/codeql-analysis.yml4
-rw-r--r--.github/workflows/oss-fuzz.yml4
-rw-r--r--mrbgems/mruby-catch/mrblib/catch.rb8
-rw-r--r--mrbgems/mruby-catch/test/catch.rb23
5 files changed, 19 insertions, 36 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 135e39ca7..ad5a66ebe 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,17 +3,7 @@ name: Build & Test
on: [push, pull_request]
jobs:
- Check-Skip:
- if: |
- !contains(github.event.head_commit.message, '[ci skip]') &&
- !contains(github.event.head_commit.message, '[skip ci]') &&
- !contains(github.event.head_commit.message, '[skip gha]')
- runs-on: ubuntu-latest
- steps:
- - run: echo not skip
-
Ubuntu-1604:
- needs: Check-Skip
runs-on: ubuntu-16.04
env:
MRUBY_CONFIG: ci/gcc-clang
@@ -28,7 +18,6 @@ jobs:
run: rake -m test:build && rake test:run
Ubuntu-1804-gcc:
- needs: Check-Skip
runs-on: ubuntu-18.04
env:
MRUBY_CONFIG: ci/gcc-clang
@@ -43,7 +32,6 @@ jobs:
run: rake -m test:build && rake test:run
Ubuntu-1804-clang:
- needs: Check-Skip
runs-on: ubuntu-18.04
env:
MRUBY_CONFIG: ci/gcc-clang
@@ -58,7 +46,6 @@ jobs:
run: rake -m test:build && rake test:run
macOS:
- needs: Check-Skip
runs-on: macos-latest
env:
MRUBY_CONFIG: ci/gcc-clang
@@ -73,7 +60,6 @@ jobs:
run: rake -m test:build && rake test:run
Windows-MinGW:
- needs: Check-Skip
runs-on: windows-latest
env:
MRUBY_CONFIG: ci/gcc-clang
@@ -88,7 +74,6 @@ jobs:
run: rake -m test:build && rake test:run
Windows-Cygwin:
- needs: Check-Skip
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
@@ -134,7 +119,6 @@ jobs:
run: echo '::set-env name=PATH::C:\windows\System32'
Windows-VC:
- needs: Check-Skip
runs-on: windows-latest
env:
MRUBY_CONFIG: ci/msvc
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 19fb63b35..ea9f9bd8e 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -8,10 +8,6 @@ on:
jobs:
CodeQL-Build:
- if: |
- !contains(github.event.head_commit.message, '[ci skip]') &&
- !contains(github.event.head_commit.message, '[skip ci]') &&
- !contains(github.event.head_commit.message, '[skip gha]')
runs-on: ubuntu-latest
diff --git a/.github/workflows/oss-fuzz.yml b/.github/workflows/oss-fuzz.yml
index 8f2b24f17..60414e7dc 100644
--- a/.github/workflows/oss-fuzz.yml
+++ b/.github/workflows/oss-fuzz.yml
@@ -2,10 +2,6 @@ name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
- if: |
- !contains(github.event.head_commit.message, '[ci skip]') &&
- !contains(github.event.head_commit.message, '[skip ci]') &&
- !contains(github.event.head_commit.message, '[skip gha]')
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
diff --git a/mrbgems/mruby-catch/mrblib/catch.rb b/mrbgems/mruby-catch/mrblib/catch.rb
index 8e5f59023..9a60a67a3 100644
--- a/mrbgems/mruby-catch/mrblib/catch.rb
+++ b/mrbgems/mruby-catch/mrblib/catch.rb
@@ -1,8 +1,8 @@
class UncaughtThrowError < ArgumentError
- attr_reader :_tag, :_val
- def initialize(tag, val)
- @_tag = tag
- @_val = val
+ attr_reader :tag, :value
+ def initialize(tag, value)
+ @tag = tag
+ @value = value
super("uncaught throw #{tag.inspect}")
end
end
diff --git a/mrbgems/mruby-catch/test/catch.rb b/mrbgems/mruby-catch/test/catch.rb
index fe5bda096..38a4eb907 100644
--- a/mrbgems/mruby-catch/test/catch.rb
+++ b/mrbgems/mruby-catch/test/catch.rb
@@ -3,10 +3,14 @@ assert "return throw value" do
result = catch :foo do
loop do
loop do
- throw :foo, val
+ begin
+ throw :foo, val
+ rescue Exception
+ flunk("should not reach here 1")
+ end
break
end
- flunk("should not reach here")
+ flunk("should not reach here 2")
end
false
end
@@ -30,13 +34,16 @@ assert "pass the given tag to block" do
catch(tag){|t| assert_same(tag, t)}
end
-assert "tag identity" do
- assert_raise_with_message_pattern(Exception, "uncaught throw *") do
- catch [:tag] do
- throw [:tag]
- end
- flunk("should not reach here")
+assert "tag identity, uncaught throw" do
+ tag, val = [:tag], [:val]
+ catch [:tag] do
+ throw tag, val
end
+ flunk("should not reach here")
+rescue Exception => e
+ assert_match("uncaught throw *", e.message)
+ assert_same(tag, e.tag)
+ assert_same(val, e.value)
end
assert "without catch arguments" do